Top-up Amount API
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 topup request. It will be used to prevent accidentally creating the same topup request more than once.
- Idempotency key is mandatory for each topup request. This ensures topup request won't be created 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
bank_id
Integer
Mandatory
The id of the bank retrieved from the banks API.
amount
String
Mandatory
The amount of money to top-up.
Example
curl -X POST \
https://api.durianpay.id/v1/disbursements/topup \
-H 'authorization: [Base64({Your_Server_Key}:)]' \
-H 'content-type: application/json' \
-H 'X-Idempotency-Key: <YOUR_X_IDEMPOTENCY_KEY>' \
-d '{
"bank_id": 1,
"amount": "10000"
}'
Response Code
200 - Success
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "data": { "sender_bank": "bni", "total_amount": "10000", "status": "processing", "expiry_date": "2021-03-21T09:58:53Z", "transfer_to": { "bank_code": "bni", "bank_name": "BNI / BNI Syariah", "atm_bersama_code": "009", "bank_account_number": "0437051936", "account_holder_name": "PT Fliptech Lentera Inspirasi Pertiwi", "unique_code": 10 }, } }
200 - Success
400 - Invalid Request
401 - Unauthorized Access
409 - Invalid Request
500 - Internal Server Error