Documentation sections
Documentation/API
Cancel a payment
POST /v1/payments//cancel - cancel before payment starts
/api/v1/payments/{id}/cancelOverview
Cancels a payment before the customer has started paying (status CREATED): the customer abandoned the order - the payUrl link immediately stops accepting payment and shows an "Invoice canceled" screen. The response is the same payment object with status CANCELED, and a webhook is sent for the transition.
Canceling an already canceled payment is safe: you get 200 again with the same object and no second webhook, so retries are fine.
When cancellation is not possible
Once the customer has started paying (status PENDING - an SBP QR code has been shown or card details have been sent), the invoice is already issued and cannot be revoked - you get a 409. Wait for the final status: if the customer does not pay, the payment becomes EXPIRED on its own; if they do, it becomes SUCCESS, and the matter is then handled as a refund via support.
A 409 on cancellation means "the payment may still go through": do not fulfill the order or write it off until the final webhook arrives.
orderId after cancellation
The order number of a canceled payment stays taken: creating a payment with the same orderId returns 409 (duplicate protection). If the order becomes relevant again, create a payment with a new orderId, for example with an attempt suffix: "order-1001-2".
curl -X POST https://tabpay.org/api/v1/payments/6b9d2c88-4b1a-4f0e-9c37-1f2ab34cd561/cancel \
-H "X-Api-Key: tp_your_key"{
"id": "6b9d2c88-4b1a-4f0e-9c37-1f2ab34cd561",
"orderId": "order-1001",
"status": "CANCELED",
"amountKopecks": 19900,
"commissionKopecks": 1393,
"description": "Monthly subscription",
"method": null,
"telegramId": null,
"metadata": null,
"successUrl": null,
"failUrl": null,
"payUrl": "https://tabpay.org/pay/6b9d2c88-4b1a-4f0e-9c37-1f2ab34cd561",
"isTest": false,
"paidAt": null,
"createdAt": "2026-07-30T09:12:00.000Z"
}