Skip to main content

Validate Bank Account(Not available on sandbox)

Api Endpoint:

This API for Validating Bank Account will be a POST request.

{BaseUrl}/payouts/validateBankAccount

Description

The Validate Bank Account for Payouts API is used to confirm the validity of a recipient's bank account details before initiating a payout. It ensures that the provided bank account information is correct, active, and capable of receiving funds—reducing the risk of failed transactions due to incorrect or invalid bank details.

Request

Request Header

The request must include the following headers for authentication:

Request Header
{
"apiKey": "your api key",
"token": "your token",
"content-type": "application/json"
}
  • apiKey: Your unique API key provided by PayHub.
  • token: A token that validates your session or request.
  • content-type: Specifies that the request body is in JSON format.

Request Body

The body of the request for validating bank account using account number and bank ifsc:

Request Body
{
"account_number":"Bank Account Number",
"bank_ifsc":"Bank IFSC"
}
  • account_number: Bank account number to be validated.
  • bank_ifsc: IFSC code of the bank branch for the account.

Possible Responses:

Success Response

A response indicating that the bank account details have been successfully validated.

Success Response
{
"responseCode": 200,
"responseMessage": "Success",
"responseData": {
"code": "S00000",
"status": "success",
"message": "The account has been successfully verified.",
"beneficiaryName": "Name of the beneficiary"
}
}
  • responseCode: 200 - Indicates a successful request.
  • responseMessage: Success - Confirms that the response is success.
  • responseData: Contains the details of the validation result.
    • code: S00000 - A standardized code indicating successful validation.
    • status: success - The outcome of the validation (e.g., success, failed).
    • message: The account has been successfully verified. - A descriptive message returned by the system or bank.
    • beneficiaryName: Name of the beneficiary - The verified account holder’s name as returned by the bank.

Error Response

A response indicating that the bank account could not be validated due to incorrect details or an invalid request.

Error Response
{
"responseCode": 200,
"responseMessage": "Success",
"responseData": {
"code": "E00000",
"status": "failure",
"message": "Account details are not valid".
}
}
  • **responseCode: 200 -**Indicates a successful request.
  • responseMessage: Success - Confirms that the response is success.
  • responseData: Contains the details of the validation result.
    • code: E00000 - A standardized code indicating failed validation.
    • status: failure - Indicates the validation attempt was unsuccessful.
    • message: Account details are not valid - A descriptive message explaining the reason for failure.
NRE account
{
"responseCode": 200,
"responseMessage": "Success",
"responseData": {
"code": "E09999",
"status": "failure",
"message": "Transaction not allowed to NRE account".
}
}
  • **responseCode: 200 -**Indicates a successful request.
  • responseMessage: Success - Confirms that the response is success.
  • responseData: Contains the details of the validation result.
    • code: E09999 - A standardized code indicating failed validation due to NRE account type.
    • status: failure - Indicates the validation attempt was unsuccessful.
    • message: Transaction not allowed to NRE account - A descriptive message explaining the reason for failure.

Invalid API Key

A response indicating that the provided API key is invalid.

Invalid API Key
{
"responseCode": 401,
"responseMessage": "Invalid apiKey"
}
  • responseCode: 403 - Indicates forbidden access due to an invalid API key.
  • responseMessage: Invalid apiKey - A message indicating the provided API key is invalid.

Missing Account Number

A response indicating that Account Number is missing in the request.

Missing Account Number
{
"responseCode": 400,
"responseMessage": "account_number is required.",
}
  • responseCode: 400 - Indicates a bad request.
  • responseMessage: account_number is required. - A message indicating the request does not contain required property account_number.

Missing Bank IFSC

A response indicating that Bank IFSC is missing in the request.

Missing Bank IFSC
{
"responseCode": 400,
"responseMessage": "bank_ifsc is required.",
}
  • responseCode: 400 - Indicates a bad request.
  • responseMessage: bank_ifsc is required. - A message indicating the request does not contain required property bank_ifsc.

Notes

  • Ensure that all required parameters are provided and valid.
  • Check the response codes to handle different outcomes appropriately in your application.
  • For security, keep your API key and token confidential.

By following this documentation, you can integrate and use the Validate Bank Account API effectively in your payment gateway system.