PaygateDeveloper documentation
422payments.cancel_not_allowedpaymentsRule R16

Only an open payment can be canceled

Cancel works while the payment is created, requires_action or failed. A processing payment cannot be canceled — money may already be moving — and a succeeded, expired or already-canceled one has nothing to cancel.

Why the API refuses

WHEN CancelPayment is executed, THE SYSTEM SHALL reject it unless the payment status is created, requires_action or failed; IF the current attempt holds a cancelable instrument THEN THE SYSTEM SHALL void it at the provider before transitioning to canceled.

What to do

  • Read the payment and branch on status. For processing, wait for the terminal state (or its webhook) and refund if it succeeds and you no longer want it.
  • For succeeded, use POST /payments/{id}/refunds instead.
  • An expired payment needs no cancelation; treat expiry as the cancelation.

Operations that can return it