Skip to main content
TL;DR: Cancel only works on a pending session — check the status first if you get a 409.
Cancelling a checkout session only makes sense while it’s still pending. Calling cancel on a session in any other state returns a conflict, rather than silently doing nothing or charging/refunding on your behalf.

When this happens

  • You call cancel while the shopper is mid-payment (session processing), or after it already reached completed, authorized, failed, expired, or cancelled.
  • The session’s status changes while your cancel is being applied — for example, the shopper presses Pay at the same moment. The cancel loses the race and returns the same 409.
  • You call cancel on a checkout_id that doesn’t exist for your account.

What you see

The Error type column shows the slug after urn:radiumone:checkout-hpp: — the body’s type is the whole URN, for example urn:radiumone:checkout-hpp:session-invalid-state. Match the whole value.Calling cancel twice on an already-cancelled session is safe — it’s treated as idempotent, not an error. Only a session in processing or a terminal state (completed, authorized, failed, expired) other than cancelled returns the 409.

What to do

1

Check the session's current status first

Before retrying a cancel that returned 409, find out what actually happened (API reference):
2

Branch on the status

  • processing: wait and re-check shortly — the shopper is actively completing payment, and cancelling mid-attempt isn’t supported.
  • completed: the payment already succeeded. Don’t retry the cancel — if you need to reverse it, refund the transaction through the Payments API instead.
  • authorized: the card is held for the full amount but nothing was captured. Cancel can’t release it, and neither can a void. Capture it through the Payments API using the session’s gateway_transaction_id if you still want the order, or let the hold lapse: it’s released when its capture window runs out (authorization.expired). See Authorized: a hold, not a payment.
  • failed: the session is already terminal and nothing was charged — no action needed.
  • expired: the session is terminal. If decline_reason is "expired_while_processing", it expired while a payment was in flight and the charge may have gone through: wait for the payment.* webhook, or a final transaction status, before you resell the order (fulfil it instead on payment.captured) — see Session expired mid-payment.
  • cancelled: already done — treat the original conflicting call as resolved.
3

Retry the cancel only from pending

Once (or if) the session returns to pending, cancel is safe to call (API reference):

Session lifecycle

Full cancellation and TTL behavior.

API errors

The full error reference, including urn:radiumone:checkout-hpp:session-invalid-state.

Handle failures

All ten failure scenarios, symptom → page.
Last modified on October 25, 2026