Bank account verification is a sub-service of Cashfree payouts that allows a merchant to verify their end customer’s bank details. This section provides details on how to integrate bank account verification from scratch.

Steps

  1. Setup
  2. Initiatlization and Authorization
  3. Verify bank account

Check out our Libraries and Samples section for the integration code hosted on GitHub.

Step 1: Setup

Get your corresponding clientId and clientSecret from your payout dashboard and ensure that your IP is whitelisted as well. Check our development quickstart here.

Host URL: Use the following URL for PROD and TEST, respectively:

For the production environment: https://payout-api.cashfree.com For the test environment: https://payout-gamma.cashfree.com

Step 2: Initialization and Authorisation

Call the authenticate API to Cashfree’s system/server to obtain an Authorization Bearer token. All other API calls must have this token as Authorization header in the format ‘Bearer <token>’ (without quotes) for them to be processed.

curl -X POST \
  'http://{{Host%20Url}}/payout/v1/authorize' \

  -H 'X-Client-Id: {{client id}}' \
  -H 'X-Client-Secret: {{client secret}}' \
  -H 'cache-control: no-cache'

Sample Response

{
  "status": "SUCCESS",
  "message": "Token generated",
  "subCode": "200",
  "data": { "token": "eyJ0eXA...fWStg", "expiry": 1564130052 }
}

Step 3: Verify Bank Account

Verify a bank account by passing a name, phone number, bank account, and ifsc. Verification will be done on the bank account and ifsc combination.

The operation returns a success response in two cases:

  • The bank account or IFSC code or both are invalid.
  • The bank account and IFSC combination are verified.
curl -X GET \
  'http://{{Host%20Url}}/payout/v1/validation/bankDetails?name=John&phone=9908712345&bankAccount=026291800001191&ifsc=YESB0000262' \
  -H 'Authorization: Bearer {{Token}}' \
  -H 'cache-control: no-cache'

Sample Response

{
  "status": "SUCCESS",
  "subCode": "200",
  "message": "Amount Deposited Successfully",
  "data": { "nameAtBank": "John Barnes Smith", "accountExists": "YES", "amountDeposited": "1.28", "refId": "5a7da061af50584d5992b2" }
}

You now have a complete bank account validation integration for payouts. When testing your integration with your test API key, you can use the details available here to ensure that it works correctly.

Was this page helpful?