Greetings, we are currently exploring the use of Square Terminals for integration with in-house POS system and one detail seems to strike me odd: Location users can authenticate multiple terminals for multiple locations (and even more, do multiple sessions for single terminal on the same location).
What is confusing, there seems to be no quick programmatic way to understand on which location a given terminal is currently having an open session.
Here is a test scenario:
- Create Location A and B
- For Loc. A request new device code
- Authenticate terminal with Loc. A, then logout.
- Observe terminal still being associated in
/devices/codes
endpoint - For Loc. B request new device code
- Authenticate terminal with Loc. B
- Observe terminal being associated with both Loc. A and Loc. B in
/devices/codes
, but location is changed in list devices
At this point it seems that observing device.code.pairing
works, but in fact is only usable for the first time: Device codes are multi-use and need to be deleted from merchant dashboard.
The workaround I see now is polling /devices
endpoint periodically, however this has caveat:
Even after deleting device codes from dashboard the terminal is still listed on the last location it was used on.
So request is:
- Can we have device.authenticated webhook — happens on each login action
OR - Can we have device.logged_out webhook — happens on each logout?