Fetch durianpay balance API


The following endpoint retrieves the balance in the durianpay account.

/disbursements/topup/balance

Example

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

Response Code : 200

Here is an example of success response

{
    "data": {
        "balance": 949859471313
    }
}

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 invalide request

{
  "error": "error getting balance",
  "error_code": "DPAY_INTERNAL_ERROR"
}