Validate Disbursement API
The following endpoint can be used to fetch the bank account and account number validation:
Request Header Attributes
Following are the parameters to be sent in the request header:
X-Idempotency-Key
String
Mandatory
The idempotency key used to submit a disbursement validate request. It will be used to prevent accidentally creating the same disbursement validate request more than once.
- Idempotency key is mandatory for each disbursement validate request. This ensures disbursement validate request won't be processed more than once. Please see more detail on Implementation Guide.
For merchants who have integrated before May 9th, 2023, we allow backward compatibility by making this optional until July 31st, 2023. By August 1st, 2023, all merchants have to implement this on request header, else requests to this API without X-Idempotency-Key on header will receive error response..
Request Attributes
account_number
String
Mandatory
The account number associated with the bank
bank_code
String
Mandatory
The bank code. Please refer here to fetch bank details
Example
curl -X POST \
https://api.durianpay.id/v1/disbursements/validate \
-H 'authorization: [Base64({Your_Server_Key}:)]' \
-H 'content-type: application/json' \
-H 'X-Idempotency-Key: <YOUR_X_IDEMPOTENCY_KEY>' \
-d '{
"account_number": "123456789",
"bank_code": "bca"
}'
Response Examples
Example Response
// valid response status
{
"data": {
"account_number": "12383830",
"bank_code": "bca",
"account_holder": "Dummy Name",
"status": "valid"
}
}
//invalid response status
{
"data": {
"account_number": "12383831",
"bank_code": "bca",
"account_holder": "Dummy Name",
"status": "invalid"
}
}
API Usage
Please note the above endpoint takes some time to evaluate the results. When it's under evaluation it will return the status as processing.
Response Code
200 - Success
1 2 3 4 5 6 7 8
{ "data": { "account_number": "123737383830", "bank_code": "bca", "account_holder": "", "status": "processing" } }
200 - Success
400 - Invalid Request
401 - Unauthorized Access
409 - Invalid Request
500 - Internal Server Error