Skip to main content

Get payment status

Fetches payment status by payment_details_id.

Endpoint​

GET /payments/status

Query Parameters​

  • version (string, required) - API contract version. Use exactly 2024-10-01.
  • diagnostics (boolean, optional) - Non-production docs only. Set true to include extra diagnostic metadata (for example observed_client_ip).
  • api_key (string, required)
  • payment_details_id (string, required)

Header Parameters​

  • PW-subscription-key (string, required)
  • PW-origin-country (string, required)
  • PW-request-date (string, required)
  • PW-ip-address (string, required)
  • User-Agent (string, required)

Request Body​

No JSON request body.

Responses​

200 - Wrapper-normalized response envelope (success cases).​

Example: payment_pending​

{
"status": "success",
"code": 200,
"message": "Payment Pending",
"request_id": "3f49f7a5-6d6b-42a3-a5eb-98e8e3a6a4f0",
"timestamp": "2026-03-14T04:51:59.000Z",
"payment_details": {
"id": 179,
"transaction_id": "checkout-direct-devhouse-1773463918",
"amount": "25.00",
"status": "Pending",
"currency": "TTD",
"payments_status": {
"paid": "0.00 TTD",
"remaining": "25.00 TTD",
"metadata": []
}
}
}

Example: payment_cancelled​

{
"status": "success",
"code": 200,
"message": "Payment Cancelled",
"request_id": "6d43d8c9-23bf-4aa9-9800-42ef4b39f283",
"timestamp": "2026-03-14T04:52:10.000Z",
"payment_details": {
"id": 179,
"transaction_id": "checkout-direct-devhouse-1773463918",
"amount": "25.00",
"status": "Cancelled",
"currency": "TTD",
"payments_status": {
"paid": "0.00 TTD",
"remaining": "25.00 TTD",
"metadata": []
}
}
}

400 - Wrapper-normalized response envelope (400)​

Example: error​

{
"status": "error",
"code": 400,
"message": "payment_details_id is required",
"request_id": "eb97a05c-774e-4f48-9a81-b7bba2157a16",
"timestamp": "2026-02-11T03:59:45.622Z",
"observed_client_ip": {
"request_ip": "172.64.80.1",
"socket_remote_address": "172.64.80.1"
}
}

Example: invalid_api_key_from_upstream​

{
"status": "error",
"code": 400,
"message": "Unauthorized: invalid `api_key` ",
"request_id": "0dfd0d4f-a84e-4f58-96a5-c5b42f0fb188",
"timestamp": "2026-03-14T04:45:02.000Z",
"errorCode": "PW_UNAUTHORIZED_INVALID_API_KEY"
}

500 - Wrapper-normalized response envelope (500)​

Example: captured_primary​

{
"status": "error",
"code": 500,
"message": "Server Error",
"request_id": "03cc465a-1bdd-4548-838c-562c6bc8b67f",
"timestamp": "2026-02-11T03:59:45.617Z",
"observed_client_ip": {
"request_ip": "172.64.80.1",
"socket_remote_address": "172.64.80.1"
}
}

Notes​

This endpoint page is generated from openapi/pw-wrappers.2024-10-01.yaml.