Your Terminal API documentation says a timeout cancellation can later become COMPLETED:
For Square Handheld and Square Terminal, what server-verified condition guarantees the original checkout can no longer capture, so a third-party POS can safely allow another payment attempt?
In particular, after an explicit buyer cancellation or CancelTerminalCheckout followed by GetTerminalCheckout returning CANCELED with no payment IDs, is that final, or can a payment still complete later? Are any cancel_reason values authoritative for safe retry?
We currently keep canceled or uncertain attempts locked for review and retrieve the Payment before marking anything paid. We want to avoid duplicate charges when an artist retries or switches payment methods.
With regards to CANCELED with no payment_ids being final after a buyer cancels or CancelTerminalCheckoutoccurs:
if BUYER_CANCELED it’s usually final. However, some device-side errors are also reported with this reason, so don’t treat it as a guarantee on its own.
ifSELLER_CANCELED (from CancelTerminalCheckout) then yes, once it reaches CANCELED, Square won’t move it to COMPLETED later. Cancelling an IN_PROGRESS checkout is only a request to the device so if the buyer has already paid, it ends up COMPLETED instead. Always confirm the final state with GetTerminalCheckout or the terminal.checkout.updated webhook.
In terms if cancel_reason’s listen to for a safe retry, SELLER_CANCELED is the most reliable. TIMED_OUT is not final: as the docs note, it can still become COMPLETED if the device was finishing a payment at the deadline.
Lastly, what server-verified condition guarantees the original can’t capture? The status alone isn’t enough. We recommend pairing it with an Order check:
Create checkouts with an order_id
Before retrying, call RetrieveOrder and confirm the order is still OPEN with no tenders from the earlier attempt. If so, create a new checkout for the same order (docs ( Take Payments for Orders )).
As a backstop, reconcile with payment.created/payment.updated webhooks or ListPayments.
For extra protection on uncertain attempts, you can set payment_options.autocomplete = false. An unexpected payment then stays APPROVED and you can void it with CancelPayment instead of refunding it.
Your current approach of locking canceled and uncertain attempts and checking the Payment before marking anything paid is the right one. The Order check adds the server-side confirmation you’re looking for.
Hope that helps, let me know if you have any other questions!