Dark Mode

Top-up Amount API


The following endpoint can be used to top-up amount to durianpay account:

/disbursements/topup

Run in Postman

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.

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
17
18
{
    "data": {
        "id": "topup_123",
        "sender_bank": "bni",
        "merchant_name": "",
        "total_amount": "1123",
        "status": "processing",
        "expiry_date": "0001-01-01T00:00:00Z",
        "transfer_to": {
            "bank_code": "bni",
            "bank_name": "Bank BNI / BNI Syariah",
            "atm_bersama_code": "009",
            "bank_account_number": "12345678",
            "bank_holder_name": "PT DurianPay",
            "unique_code": 123
        }
    }
}

202 - Request Accepted

400 - Invalid Request (Amount - Negative or Zero)

400 - Invalid Request (Invalid Amount)

400 - Invalid Request (Amount - More than 2 Decimal Places)

400 - Invalid Request (Invalid Bank Code)

400 - Invalid Request

401 - Unauthorized Access

409 - Conflict

500 - Internal Server Error

504 - Gateway Timeout