This document will align how to create a minimum viable integration with Thanx API services towards your POS or Kiosk device.
For this kind of integration, you will be provided the following credentials:
In order to achieve the full POS integration, these are the endpoints your integration should interact with:
Note that these are the minimum required endpoint interactions in order to build a successful and reliable Thanx integration. If more user data is needed, you can always ask which endpoints to consume to get the desired user data.
The user arrives at the POS and either scans their QR code (if QR check-in is enabled) or provides their phone number or email to log in.
The POS uses this information to request an access token via the Create Access Token API using the user ID, email, or phone.
With the acquired token, the POS calls the Get Account endpoint to retrieve user details and available rewards.
During the purchase decision phase, the POS sends the current basket with "checkout"
state to the Create or Update Basket endpoint.
This call should be made any time the user updates their basket or reward selection, to ensure discounts are recalculated if necessary.
When the order is submitted, the POS updates the basket with the "placed"
state to lock the reward.
When the user decides to pay, the POS calls the same endpoint with the "billed"
state.
(Recommended) After billing, the POS calls the endpoint with the "completed"
state to indicate that the order has been handed to the customer.
(Recommended) If an order is canceled after being placed but before being billed, the POS should call the endpoint with the "voided"
state.
(Recommended) If an order is refunded or canceled after billing, the POS should use the "refunded"
state.
(Optional but Recommended) For full lifecycle tracking, the POS should consistently report state transitions for every order using the Create or Update Basket endpoint. This ensures loyalty data remains accurate and recoverable in case of disputes or technical issues.