Approve Disbursement API
As per Bank of Indonesia's regulation, starting from July 2024, we'll be stop supporting this version of the API. Please use the SNAP version instead.
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 approve request. It will be used to prevent accidentally approving the same disbursement more than once.
- Idempotency key is mandatory for each disbursement approve request. This ensures disbursement approve request won't be processed more than once. Please see more detail on Implementation Guide.
Path Attributes
id
String
Mandatory
Unique identifier of the disbursement to be approved.
Query Attributes
ignore_invalid
Boolean
Optional
Default false
. If set to true, ignores the invalid batch items and disburse only the valid items.
Example
curl -u [Base64({Your_Server_Key}:)] \
-X POST https://api.durianpay.id/v1/disbursements/dis_XXXXX/approve \
-H "content-type: application/json" \
-H "X-Idempotency-Key: <YOUR_X_IDEMPOTENCY_KEY>" \
Response Code
200 - Success
1 2 3 4 5 6 7 8 9 10 11 12
{ "data": { "id": "dis_123", "name": "sample disbursement", "idempotency_key": "123xxx", "type": "batch", "status": "approved", "total_amount": "20000.00", "total_disbursements": 2, "description": "this is a sample disbursement" } }
202 - Request Accepted
400 - Invalid Request
401 - Unauthorized Access
403 - Forbidden
409 - Conflict
500 - Internal Server Error
504 - Gateway Timeout