Approve Disbursement 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 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.
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..
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
{ "data": { "id": "dis_XXXX", "name": "sample disbursement", "type": "batch", "status": "approved", "total_amount": "10000.00", "total_disbursements": 1, "description": "this is a sample disbursement" } }
200 - Success
400 - Invalid Request
401 - Unauthorized Access
409 - Invalid Request
500 - Internal Server Error