Top-up API
Top-up amount
The following endpoint can be used to top-up amount to durianpay account:
/disbursements/topup
Request parameters
Following are the parameters to be sent in the request body:
Field | is required? | Description |
---|---|---|
bank_id | mandatory | integer The id of the bank retrieved from the banks API. |
amount | mandatory | string 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' \
-d '{
"bank_id": 1,
"amount": "10000"
}'
Response Code : 200
Here is an example of success response
{
"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
},
}
}
Error Response Code : 400
Here is an example error response for invalid request
{
"error": "error reading request body",
"error_code": "DPAY_INTERNAL_ERROR",
}
Error Response Code : 401
Here is an example error response for unauthorized access
{
"error": "invalid Authorization header in request",
"error_code": "DPAY_UNAUTHORIZED_ACCESS"
}
Error Response Code : 500
Here is an example error response for internal server error
{
"error": "error topping up balance",
"error_code": "DPAY_INTERNAL_ERROR"
}