/

to search

Introducing Setu Changelog Check it out ↗

#Async API

The following guide describes an async implementation of our bank account verification APIs. This lets you initiate a verification request and let it complete asynchronously—without having to wait for an immediate response. Essentially, you will need the following 2 APIs—

  • Verify bank account—This lets you initiate a verification request.
  • Get verification request details—This lets you check the status associated with the verification request.

Here are the URLs you would need for this integration—

  • Sandbox—https://dg-sandbox.setu.co
  • Production—https://dg.setu.co
  • Headers—Contact Setu for providing the credentials required to successfully call Setu APIs. This contains:
    • x-client-id
    • x-client-secret
    • x-product-instance-id

#Verify bank account

Call this API to initiate bank account verification of your customer. A quick explanation of the request params—

  • ifsc is the IFSC (Indian Financial System Code) of the bank branch, where the bank account is held.
  • accountNumber is the bank account number that has to be verified.
  • narration is the reason for carrying out bank account verification

While testing on Sandbox, you may use sample values to mimic real-life scenarios. Use the below values to get specific responses from the Get verification request details API.


Set the accountNumber value as 1234567890 always. Use the ifsc values as mentioned below, to mimic respective scenarios—

  • ABCD0123456—successful verification response.
  • ABCD0123457—invalid transaction response. This may happen if the provided account does not support IMPS transactions.
  • ABCD0123458—transaction limit may have been reached. This may happen if, at the time of the penny drop, the transaction breaches the the daily IMPS limit for the account. While this is rare, it is still a possibility.
  • ABCD0123459—downstream service error.
  • ABCD0123450—pending verification.
  • ABCD0123467—invalid account details.

Your request contains a valid bank account number and the verification request has been successfully initiated.


Request
POST /api/verify/ban/async
{
"ifsc": "ABCD0123456",
"accountNumber": "1234567890",
"narration": "test transaction for verification"
}

Response

You get an id associated with the verification request, which you can use to check verification status asynchronously.

{
"id": "02c2dc4c-1015-4ea0-8ec4-987829fc70cc"
}

#Get verification request details

Call this API to know verification status of request that was previously initiated, against the id associated with it.


Verification was successful and the account is active.


Request
POST /api/verify/ban/async/:requestId

Response

You get the name of the account holder in the response.

{
"id": "d9342684-1300-4fa8-8344-cc861a20a488",
"code": "BAV00",
"verification": "success",
"message": "Account exists and is active.",
"data": {
"name": "name of the account holder",
"transactionReference": "120716373986",
"verifiedAt": "2017-08-28T09:36:18+00:00"
}
"traceId": "...",
}

Was this page helpful?