Virtual Accounts Fetch By ID API


The following endpoint retrieves the details of a single Virtual Account

/payments/va/:id

Path parameters

Fieldis required?Description
idmandatoryinteger Unique identifier of the Virtual Account to be retrieved

Sample Request (cURL)

curl --location --request GET 'https://api.durianpay.id/v1/payments/va/va_sample_6YBBiGRAPa0943' \
--header 'Authorization: [Base64({Your_Server_Key}:)]'

Sample Response

{
    "data": {
        "virtual_account": {
            "id": "va_sample_6YBBiGRAPa0943",
            "bank_code": "PERMATA",
            "account_number": "8856500451311212",
            "name": "Ardi Hanan Durian",
            "is_closed": false,
            "amount": 0,
            "currency": "IDR",
            "customer_id": "cus_akA2FwrR5B2217",
            "is_sandbox": true,
            "created_at": "2022-06-27T02:42:28.753671Z",
            "expiry_at": "2022-06-27T13:54:27.333786Z",
            "metadata": {},
            "is_disabled": false,
            "is_paid": false,
            "is_reusable": true,
            "min_amount": 50000,
            "max_amount": null,
            "va_ref_id": "",
            "auto_disable_after_payment": false
        },
        "virtual_account_status": "VirtualAccountExpired",
        "customer": {
            "id": "cus_akA2FwrR5B2217",
            "customer_ref_id": "",
            "given_name": "",
            "middle_name": "",
            "sur_name": "",
            "email": "p.ardi.h@gmail.com",
            "mobile": "+628978678578"
        }
    }
}

Authorization Errors

Authorization errors are errors that occur during authorization. The status code returned is usually 401

{
    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"
}

Sample Error

The possible error status codes are: 404, 500

{
    "error": "sql: no rows in result set",
    "error_code": "DPAY_VA_NOT_FOUND",
    "request_id": "dp_d3HX9S5W0r4989"
}