Payment.Cancel
Cancels a payment created using Payment.Create or Payment.Start.
The method is available if Payment.Cancel is listed in operations in the Payment.Systems.Get response. The entire amount is cancelled. The payment must not be linked to a fiscal sale receipt.
A repeated request with the same identifier returns the payment's current state. If cancellation or refund is unavailable, the method returns error 704036.
Input parameters
| Name | Data type | Required | Description |
|---|---|---|---|
| payment_id | string | Conditionally required | Local REGOS: VCR payment id from the Payment.Create or Payment.Start response |
| external_id | string | Conditionally required | Identifier supplied in Payment.Start |
Supply payment_id or external_id. If both are supplied, payment_id is used.
Request example
{
"jsonrpc": "2.0",
"method": "Payment.Cancel",
"params": {
"payment_id": "58847e73-b40b-4746-8a07-44582991bd6b"
},
"auth": "a2Fzc2E6a2FzMTIzNDU2",
"id": 1
}
Output parameters
The method returns a payment object in the Payment.Get format.
For asynchronous cancellation, call Payment.Get, passing Payment.Cancel.result.id in payment_id:
| Group | Payment statuses |
|---|---|
| Operation in progress | 4, 9 |
| Operation completed | 5, 8 |
| Cancellation not completed | -1, 3, 7 |
Response example
{
"jsonrpc": "2.0",
"result": {
"id": "58847e73-b40b-4746-8a07-44582991bd6b",
"payment_system_id": -3,
"payment_id": "4f7afa7c-3d89-4fea-8025-a8b8f1e1468a",
"status": 5,
"amount": 1000000,
"external_id": "ORDER-2026-000123"
},
"ok": true,
"id": 1
}