v1

latestOpenAPI 3.1.02026-07-262343124.1 KB
Payments

post/v1/payments/{id}/cancel

Path parameters

idstring required

Payment ID

Example:pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV

Headers

Api-Keystring required
Merchant-Idstring required
WCP-Versionstring nullable
Sdk-Namestring nullable
Sdk-Versionstring nullable
Sdk-Platformstring nullable
Idempotency-Keystring 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_merchant",
  "paymentId": "pay_71a2ecc101KQFN7X7RM3Z9GB4ZGNM17TRB",
  "status": "cancelled"
}