Fetch disbursement by ID API


The following endpoint retrieves the details of the disbursement created

/disbursements/:id

Path parameters

Fieldis required?Description
idmandatorystring Unique identifier of the disbursement to be retrieved.

Example

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

Response Code : 200

Here is an example of success response

{
    "data": {
        "id": "dis_XXXXXXX",
        "name": "sample disbursement",
        "type": "batch",
        "status": "approved",
        "total_amount": "10000.00",
        "total_disbursements": 1,
        "description": "this is a sample description",
        "fees": 4000,
        "created_at": "2021-05-03T12:57:07.296575Z"
    }
}

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 batch",
    "error_code": "DPAY_INTERNAL_ERROR"
}