We have successfully integrated the Square Terminal with our self-checkout kiosks and we are in the latest stages of testing before moving to production.
Is there a way to know the current status of the Square Terminal? Or ping it?
We’d like to know if it’s possible for the kiosk to request the status of the Terminal in order to display an error message in case the device is offline or down. At the moment the only way of knowing is something is wrong with the Terminal is to create a Checkout, but even then it could be tricky.
- Terminal is Offline (no connectivity)
- Kiosk generates a Checkout
- Checkout created with status PENDING
- Checkout remains as PENDING until timeout is reached
- Checkout goes from PENDING to CANCELED (cancel_reason: TIMED_OUT)
Since we have to wait for the timeout to be reached this could be a very long time before knowing there is something wrong with the terminal.
By looking at the final state of a TIMED_OUT Checkout, there is no way to know if this was a legit TIME OUT (Payment was displayed at the terminal but customer never paid) or if terminal was simply unreachable.
The only way to know is the following as far as we know:
- Checkout went from PENDING to CANCELED with cancel_reason TIMED_OUT -> Terminal unreachable
- Checkout went from PENDING to IN_PROGRESS to CANCELED with cancel_reason TIMED_OUT -> Terminal OK, terminal displayed payment but customer never finished
But now we need to keep track of the changes in status of the Checkout. Unless there was a different cancel _reason.
We have thought about a workaround:
- If Checkout remains as PENDING for an extended period of time (5/10 seconds) assume terminal is unreachable, display error message in Kiosk and keep trying to reach the terminal to update message in case it gets connectivity again.
We have never seen a Checkout remain as PENDING for more than a few seconds when terminal is OK, it normally goes to IN_PROGRESS in a couple of seconds at most, so this might work.
Would that even work? Any advice here is greatly appreciated.
Here are two checkout IDs for reference: