Skip to main content

Payments Fetch API

The following endpoint retrieves the details of all Payments created

/payments

Query parameters#

Following are the parameters to be sent in the request body:

Fieldis required?Description
fromoptionalinteger Timestamp (in Unix format) from when the payments should be fetched
tooptionalinteger Timestamp (in Unix format) up till when payments are to be fetched
skipoptionalinteger The number of payments to be skipped. The default value is 0. This can be used for pagination, in combination with count
limitoptionalinteger Number of payments to be fetched. Default value is 25. This can be used for pagination, in combination with the skip parameter

Example#

curl -u <YOUR_SECRET_KEY> \
-X GET https://api.durianpay.id/v1/payments?limit=50&skip=10 \
-H "content-type: application/json"'

Response#

{
payments: [{
"id": "pay_A31sd3AwAgItmmXdp",
"amount": "20000",
"currency": "IDR",
"status": "completed",
"order_id": "ord_B14sdfwAdmmSDF24a",
"payment_ref_id": "txn2314",
"created_at": 1582628071,
"metadata": []
}],
total: 1
}