Virtual Accounts Fetch API
The following endpoint retrieves the details of all Virtual Accounts created
/payments/va
Query parameters
Following are the parameters to be sent in the request body:
from
Integer
Optional
Timestamp (in Unix format) from when the virtual accounts should be fetched
to
Integer
Optional
Timestamp (in Unix format) up till when virtual accounts are to be fetched
skip
Integer
Optional
The number of virtual accounts to be skipped. The default value is 0. This can be used for pagination, in combination with count
limit
Integer
Optional
Number of virtual accounts to be fetched. Default value is 25. This can be used for pagination, in combination with the skip parameter
Example
curl --location --request GET 'https://api.durianpay.id/v1/payments/va?limit=2&skip=2' \
--header 'Authorization: [Base64({Your_Server_Key}:)]'
Response Code
200 - Success
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
{ "data": { "virtual_accounts": [ { "id": "va_sample_QOIFczRMfG3448", "bank_code": "PERMATA", "account_number": "88565004123456", "name": "Ardi Hanan Durian", "is_closed": true, "amount": 12333, "currency": "IDR", "customer_id": "cus_CtZ8r2GOvq7341", "is_sandbox": true, "created_at": "2022-06-28T10:55:24.578679Z", "expiry_at": "2022-07-08T05:25:24.580583Z", "metadata": {}, "is_disabled": false, "is_paid": false, "is_reusable": true, "min_amount": null, "max_amount": null, "va_ref_id": "1234", "auto_disable_after_payment": true }, { "id": "va_sample_pWM5k3BUI63935", "bank_code": "PERMATA", "account_number": "8856500453252122", "name": "Ardi Hanan Durian", "is_closed": true, "amount": 12333, "currency": "IDR", "customer_id": "cus_CtZ8r2GOvq7341", "is_sandbox": true, "created_at": "2022-06-28T10:38:54.350418Z", "expiry_at": "2022-07-08T05:08:54.353053Z", "metadata": {}, "is_disabled": false, "is_paid": false, "is_reusable": true, "min_amount": null, "max_amount": null, "va_ref_id": "1234", "auto_disable_after_payment": true } ], "total": 10 } }
400 - Invalid Request
401 - Unauthorized Access
500 - Internal Server Error