v1

latestOpenAPI 3.1.02026-07-262343124.1 KB
Gateway

post/v1/gateway/payment/{id}/cancel

Path parameters

idstring required

Payment ID

Example:pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV

Headers

Api-Keystring nullable
App-Idstring nullable
Client-Idstring nullable
WCP-Versionstring nullable
Sdk-Namestring nullable
Sdk-Versionstring nullable
Sdk-Platformstring nullable

Response

Payment cancelled successfully

cancelledAtstring required
cancelledReasonstring required
paymentIdstring required

Payment ID

status'requires_action' | 'processing' | 'succeeded' | 'failed' | 'expired' | 'cancelled' required

Payment status representing the lifecycle of a payment.

Payments progress through these states from creation to terminal status. Some states are specific to the payment source (pull vs push).

Example response

{
  "cancelledAt": "2025-01-14T10:30:00Z",
  "cancelledReason": "cancelled_by_user",
  "paymentId": "pay_c4a2ecc101KQFN7X7RZACHTYV7JX5C4QET",
  "status": "cancelled"
}