Skip to main content

Orders Fetch API

The following endpoint retrieves the details of all Orders created

/orders

Query parameters#

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

Fieldis required?Description
fromoptionalinteger Timestamp (in Unix format) from when the Orders should be fetched
tooptionalinteger Timestamp (in Unix format) up till when Orders are to be fetched
skipoptionalinteger The number of orders to be skipped. The default value is 0. This can be used for pagination, in combination with count
limitoptionalinteger Number of orders 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/orders?limit=50&skip=10 \
-H "content-type: application/json"'

Response#

{
orders: [{
"id": "ord_A31sd3AwAgItmmXdp",
"amount": "20000",
"payment_option": "full_payment",
"currency": "IDR",
"status": "started",
"order_ref_id": "order2314",
"created_at": 1582628071,
"metadata": []
}, {
"id": "ord_B14sdfwAdmmSDF24a",
"amount": "10000",
"payment_option": "full_payment",
"currency": "IDR",
"status": "started",
"order_ref_id": "order1144",
"created_at": 1578228010,
"metadata": []
}],
total: 2
}