Delete disbursement API


The following endpoint retrieves the balance in the durianpay account.

/disbursements/:id

Example

curl -u [Base64({Your_Server_Key}:)] \
-X DELETE https://api.durianpay.id/v1/disbursements/dis_XXXXX \
-H "content-type: application/json"'

Response Code : 200

Here is an example of success response

{
    "data": "Deleted Successfully"
}

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 : 403

Here is an example error response for invalid request

{
    "error": "can only delete disbursements in draft status",
    "error_code": "INVALID_DISBURSEMENT_STATUS",
    "request_id": "dp_GjvDgG9H1S0322"
}

Error Response Code : 500

Here is an example error response for internal server error

{
    "error": "error deleting disbursement batch",
    "error_code": "DPAY_INTERNAL_ERROR"
}