Dark Mode

Payment Fetch by ID API


The following endpoint retrieves the details of a single Payment

/payments/:id

Run in Postman

Path Attributes

id

Integer
Mandatory

Unique identifier of the Payment to be retrieved

Query Attributes

expand

Integer
Optional

Used to retrieve additional information about the Payment. Supported values are: customer, order. Example: /payments/pay_A1B1C1D1234?expand=customer&expand=order

Example
curl -X GET \
  https://api.durianpay.id/v1/payments/pay_76n67eK9Fq4137 \
  -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
{
    "id": "pay_76n67eK9Fq4137",
    "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": {}
}

401 - Unauthorized Access

500 - Internal Server Error