Use POST /api/v1/pay/start-cancellation to cancel an authorized payment before capture or request a refund after capture. For single-stage payments, the same endpoint requests a refund.
Request
Send a signed JSON request from your backend:
| Field | Required | Description |
|---|---|---|
projectId | Yes | Your project identifier. |
transactionId | Yes | The payment transaction identifier. |
signature | Yes | HMAC-SHA-256 request signature. |
Sign only these fields, in order:
projectId → transactionId
See Signing requests for the algorithm and code examples.
Result
The HTTP 201 response normally contains status: "SUCCESS" or status: "FAILED" for the synchronous operation result. If cancellation is selected but processor cancellation data is unavailable, it instead contains status: "ERROR", an error message, and paymentProcessor.
Confirm the final outcome through the Canceled payment webhook or the Refund webhook, depending on whether the payment was captured. A synchronous SUCCESS response does not confirm the final payment or refund outcome.