Skip to main content

Payments Fetch By ID API

The following endpoint retrieves the details of a single Payment

/payments/:id

Path parameters#

Fieldis required?Description
idmandatoryinteger Unique identifier of the Payment to be retrieved

Query parameters#

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

Example#

curl -u <YOUR_SECRET_KEY> \
-X GET https://api.durianpay.id/v1/payments/pay_B14sdfwAdmmSDF24a \
-H "content-type: application/json"'

Response#

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