Skip to main content

Cancel payment

Cancels payment by payment_details_id.

Endpoint​

POST /payments/cancel

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).

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​

Schema-defined JSON body (no concrete example provided).

Responses​

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

Schema provided without concrete example payload.

400 - Wrapper-normalized response envelope (400)​

Example: error​

{
"status": "error",
"code": 400,
"message": "payment_details_id is required",
"request_id": "f1297691-052b-485d-8474-045b40ea29f9",
"timestamp": "2026-02-11T03:59:45.739Z",
"observed_client_ip": {
"request_ip": "172.64.80.1",
"socket_remote_address": "172.64.80.1"
}
}

403 - Wrapper-normalized response envelope (403)​

Example: captured_primary​

{
"status": "error",
"code": 403,
"message": "Invalid or unauthorized `PW-subscription-key`",
"request_id": "45edfc0e-bf7d-4a30-bd40-22c40c10a235",
"timestamp": "2026-02-11T03:59:45.734Z",
"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.