Dark Mode

Payment Fetch API


The following endpoint retrieves the details of all Payments created

/payments

Run in Postman

Query Attributes

from

String
Optional

Timestamp (in YYYY-MM-DD format) from when the payments should be fetched

to

String
Optional

Timestamp (in YYYY-MM-DD format) up till when payments are to be fetched

skip

Integer
Optional

The number of payments to be skipped. The default value is 0. This can be used for pagination, in combination with count

limit

Integer
Optional

Number of payments to be fetched. Default value is 25. This can be used for pagination, in combination with the skip parameter

Example
curl -X GET \
  'https://api.durianpay.id/v1/payments?limit=50&skip=10' \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \

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
{
  payments: [{
    "id": "pay_A31sd3AwAgItmmXdp",
    "amount": "20000",
    "currency": "IDR",
    "status": "completed",
    "order_id": "ord_B14sdfwAdmmSDF24a",
    "payment_ref_id": "txn2314",
    "created_at": 1582628071,
    "is_live": true,
    "expiration_date": "2021-09-21T05:11:09.574136Z",
    "payment_details_type": "ewallet_details",
    "method_id": "OVO",
    "created_at": "2021-09-20T05:11:09.574138Z",
    "updated_at": "2021-09-20T05:11:15.161768Z",
    "metadata": {},
    "retry_count": 0,
    "discount": "",
    "paid_amount": "",
    "provider_id": "",
    "total_fee": "",
    "promo_id": "",
    "shipping_fee": "",
    "ds_error_metadata": null,
    "CustomerID": "cus_iT1g1t74655079",
    "CustomerName": "test",
    "CustomerEmail": "",
    "OrderRefID": "",
    "Currency": "IDR",
    "failure_reason": {}
  }],
  total: 1
}

400 - Invalid Request

401 - Unauthorized Access

500 - Internal Server Error