List of Banks [v3]
This API returns a list of banks that can be shown to the user to select on your checkout. The list only includes banks that are enabled for you. The API also returns if the bank has any offers or additional charges to be levied. It also provides information about the health status of the bank to process transactions.
Request Body required
All of the fields in the request body are optional, if you don't send any field, you need to send an empty body object. Empty request body will provide only the list of banks without any offers or additional charges
- Encrypted payloads are not enabled by default so please reach out to our team if you want this functionality
- You will need to use AES GCM encryption for encrypting and decrypting the payload
- The same encryption/decryption logic is applicable for all the APIs called from your server
- You will be using the access_secret shared with you on your dashboard for the encryption and decryption process
- We will be happy to assist wherever possible, please reach out to help@nimbbl.biz
- Take the access_secret shared and remove the string part till
access_secret_
- Create a SHA256 digest of the remaining key we got from step 1
- AES Encrypt the unencrypted payload with AES Mode:
AES_GCM
- Encrypt the data and create a digest
- Create a bytes text in following format
- First 16 bytes as nonce
- After that the encrypted payload
- Last 16 bytes as authentication tag (This is either automatically generated or has to be manually passed depending on the programming language)
- Convert the bytes text (created in step 3) to hex
- Send the generated hex in the form of string in the encrypted_payload key
The order for which you want to display the list of banks, if you don't pass this field then no offer or additional charge information will be calculated. If you pass this field, then total_amount and currency are not required
The amount for which you want to display the list of banks and calculate the offer and additional charges, you only need to pass the amount if you don't pass the order_id
Default value: INR
The currency code in ISO-4217 format example USD, INR, GBP, you only need to pass the currency if you don't pass the order_id
Before getting started
Steps for generating the Encryption/Decryption key
Steps for encryption
- 200
- 4XX
- 5XX
When the list of banks is successfully fetched, the response will be as below
Schema
- Array [
- Array [
- ]
- ]
bank_list object[]
The name of the bank, it can be used in subsequent API calls
This is a unique bank code created by Nimbbl, it can be used in subsequent API calls
This is a public URL from which the logo of the bank can be fetched
next object[]
The next array provides a recommendation for the next API call to be made, where multiple options are available, all of these are provided
Possible values: [initiate_payment
]
Once your customer has chosen their payment method and provided all information to initiate the payment, you can use this API
Possible values: [/api/v3/initiate-payment
]
This is the end point of the API that needs to be called for the above action, you will need to append the baseurl as provided in this doc
Possible values: [up
, down
, fluctuating
]
This field provides the health status of the bank, you can use this value to show to the user on the checkout if the bank is facing any problems in processing transactions
{
"bank_list": [
{
"bank_name": "HDFC Bank",
"code": "hdfc",
"logo": "https://s3.ap-south-1.amazonaws.com/nimbbl/netbanking/hdfc_v1.png",
"next": [
{
"action": "initiate_payment",
"url": "/api/v3/initiate-payment"
}
],
"health_status": "up"
}
]
}
When the list of banks cannot be fetched, the response will be as below
Schema
error object
This is the error_code generated by Nimbbl
This is a customer friendly message that can be displayed to your consumer
This explains to your team how to recover from the error
{
"error": {
"nimbbl_error_code": "INVALID_REQUEST_PARAMETER",
"nimbbl_consumer_message": "Sorry, your payment cannot be processed due to a technical error. Please try again after some time.",
"nimbbl_merchant_message": "There is an input validation error, please check the payload of your request."
}
}
When there is a problem on the server, the response will be as below
Schema
error object
This is the error_code generated by Nimbbl
This is a customer friendly message that can be displayed to your consumer
This explains to your team how to recover from the error
{
"error": {
"nimbbl_error_code": "INVALID_REQUEST_PARAMETER",
"nimbbl_consumer_message": "Sorry, your payment cannot be processed due to a technical error. Please try again after some time.",
"nimbbl_merchant_message": "There is an input validation error, please check the payload of your request."
}
}