POS API mobile web: safely retrying a canceled or abandoned payment

Hi Square team,

We are integrating the Point of Sale API from a mobile website, opening Square POS on iPhone for in-person card payments, including Tap to Pay. We need clarification on safe retries after a canceled or abandoned app-switch request.

Scenario: our website opens Square POS with an amount, callback URL, and unique state. The seller cancels, closes the app, or returns to the browser without a callback. Before offering another payment attempt or another payment method, how can our server confirm that the original request can no longer produce a charge?

Could you confirm:

  1. Is there a server-side way to revoke or expire a mobile-web POS request, including an already-open request or a replay of its URL?
  2. Does this API support a merchant-supplied idempotency key that prevents duplicate charges if the same request is opened again?
  3. Is a cancellation callback an authoritative final outcome, and is there a server-side status we can verify when no payment or transaction ID was returned?
  4. If there is no such guarantee, what retry/recovery flow does Square recommend to avoid duplicate charges? Does the answer differ for online Tap to Pay versus reader payments that may be taken offline?

We can reconcile completed payments using Square’s APIs, but finding no matching payment yet does not establish that an abandoned request cannot complete later. We are looking for the supported way to safely allow a new attempt.

Thanks!

Hi,

  1. Revocation or expiration: There’s no supported endpoint to revoke an open POS request or expire its URL. Expiring your own checkout record doesn’t invalidate the Square request or prevent the URL from being reopened.

  2. Idempotency: The API doesn’t accept a merchant-supplied idempotency key. The iOS state field correlates callbacks with attempts; it does not deduplicate payments.

  3. Cancellation and status: A callback with status: "error" and error_code: "payment_canceled" reports cancellation of that checkout invocation, but doesn’t invalidate its URL. Switching to the browser or force-quitting POS is not cancellation confirmation. Without a returned transaction/payment ID, there’s no server-side POS-request status lookup by state.

  4. Recovery: Save the attempt before launching POS and prevent additional launches for that sale while its outcome is unresolved. Match callbacks using state and handle duplicate or delayed callbacks safely. If no callback arrives, keep the attempt unknown, have the seller return to POS to resolve the existing checkout, and reconcile completed payments through webhooks or Square’s APIs. A timeout or empty lookup alone should not trigger another payment attempt or payment method.

These application-side controls reduce accidental duplicates, but they don’t add server-side revocation or replay protection.
I hope this helps!