Order Fetch by ID API

The following endpoint retrieves the details of a single Order


Path Paramters

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

Query Parameters

Fieldis required?Description
expandoptionalinteger Used to retrieve additional information about the Order. Supported values are: customer, payments. Example: /orders/ord_A1B1C1D1234?expand=customer&expand=payments


curl -X GET \
  https://api.durianpay.id/v1/orders/ord_mJH2hKOSYb3514 \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \

Response Code : 200

Here is an example of success response

    "id": "ord_A31sd3AwAgItmmXdp",
    "amount": "20000",
    "payment_option": "full_payment",
    "currency": "IDR",
    "status": "started",
    "is_live": true,
    "order_ref_id": "order2314",
    "created_at": 1582628071,
    "metadata": []

Error Response Code : 401

Here is an example error response for unauthorized access

    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"

Error Response Code : 404

Here is an example error response for resource not found

    "error": "order does not exists",
    "error_code": "DPAY_ORDER_NOT_FOUND",

Error Response Code : 500

Here is an example error response for internal server error

    "error": "error getting orders",
    "error_code": "DPAY_INTERNAL_ERROR"