Approve Disbursement API
Path parameters
Field | is required? | Description |
---|---|---|
id | mandatory | string Unique identifier of the disbursement to be approved. |
Query parameters
Field | default | is required? | Description |
---|---|---|---|
ignore_invalid | false | optional | boolean 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" \
Response Code : 200
Here is an example of success response
{
"data": {
"id": "dis_XXXX",
"name": "sample disbursement",
"type": "batch",
"status": "approved",
"total_amount": "10000.00",
"total_disbursements": 1,
"description": "this is a sample disbursement"
}
}
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 getting disbursement",
"error_code": "DPAY_INTERNAL_ERROR"
}