Transactions/cancelTerminalPaymentSession
Cancel an unclaimed terminal payment command
Cancel a queued reader command before the terminal claims it.
POST
/v1/terminal/payment-sessions/{id}/cancelUse this only while a session is still waiting for its terminal. Once card processing starts, cancellation moves to the terminal/payment recovery flow so an issuer authorization cannot be hidden behind a canceled command.
Path parameters
idstringRequiredRequest body
application/json
merchantIdstringResponse
application/json
idstringRequiredmerchantIdstringRequiredterminalIdstringRequiredExample "TID-00012345"
deviceIdstringRequiredExample "dev_01JQXYZ123456"
idempotencyKeystringRequiredStable key the terminal uses for the single host authorization attempt and all safe retries.
Example "sale-01JQXYZ123456"
claimTokenstringRequiredFencing token issued for this terminal claim. Every device event and authorization must echo it.
operationenumRequiredPURCHASEREFUNDoriginalTransactionIdstringamountMinorintegerRequiredExample 1999
currencyCodestringRequiredExample "USD"
statusenumRequiredCREATEDCLAIMEDIN_PROGRESSSUCCEEDEDDECLINEDCANCELEDFAILEDEXPIREDRECOVERY_REQUIREDpaymentIdstringExample "0195d46e-7088-7cc4-a9b2-5f9273cd63b8"
failureCodestringfinalAmountMinorintegerFinal amount authorized after any terminal tip.
tipAmountMinorintegerExample 0
lastEventSequenceintegerRequiredexpiresAtstring · ISO 8601RequiredExample "2026-04-09T09:14:22Z"
processingExpiresAtstring · ISO 8601Fifteen-minute deadline for a reader operation already in progress. If it passes without a verified final event, status becomes RECOVERY_REQUIRED and the command is never automatically reissued.
Example "2026-04-09T09:14:22Z"
authorizationStartedAtstring · ISO 8601Time the host serialized this session's single authorization attempt.
Example "2026-04-09T09:14:22Z"
completedAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
createdAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
updatedAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
Good to know
- A 409 means the terminal has already claimed the command; poll the session instead of creating another one.
- Cancellation never interrupts an active EMV or PIN exchange.
cancelTerminalPaymentSession