Skip to main content

Overview

This guide explains how to integrate a digital, QR code–based Pay at the Table experience using our APIs. This feature lets guests log in to their account, view their order, pay directly from their mobile device, and automatically earn loyalty points for their purchase. The integration connects your on-premise ordering and payment systems with the Thanx loyalty platform. When a guest scans a QR code at their table, they’re prompted to sign up or sign in to their loyalty account. Once authenticated, the integration retrieves their account and order details, allowing them to earn and redeem rewards during checkout. By embedding this digital payment flow, merchants deliver a seamless, contactless experience that enhances guest satisfaction and loyalty participation while simplifying staff operations.

User Experience Overview

  1. The guest scans a QR code placed on their table.
  2. They are directed to a digital checkout experience branded for the merchant.
  3. If they do not have an account, they can quickly create one using their email.
  4. If they already have an account, they can sign in directly from the same flow.
  5. The guest reviews their order, applies available rewards, and completes payment from their mobile device.
  6. Once the payment is complete, loyalty points are automatically accrued to their account.

Credentials You Will Need

For this kind of integration, you will be provided the following credentials:
  • Client ID
  • Client Secret

API Interaction Workflow


Postman API Collection

Here you will find the Pay at the Table Integration API Postman Collection to import directly within your API testing tool. This collection includes sample values for credentials. Replace them with those provided by your Thanx representative to ensure successful API calls. Download Postman Collection

Technical Integration

Sign Up Flow

Used when the guest does not yet have an account. In this experience, the guest clicks Create Account and enters their email address. If the user is new, the Create User endpoint returns a token that can be used to retrieve their account information. If the user already has a Thanx account, it associates the account with the client brand before returning a 400 error. In this case, the integration must use the Acquire Authorization Code endpoint, followed by Acquire Access Token, since a token will not be returned when the request errors. Once the account is created or authenticated, your system can fetch user details and create or update the basket to handle purchases and reward accrual. Endpoints used in this flow:
  1. Create User Creates a new user and returns a token if the user is new.
  2. Acquire Authorization Code Used when the user already exists and a token was not returned.
  3. Acquire Access Token Exchanges the authorization code for an access token.
  4. Get Account Retrieves the user’s account details.
  5. Create and Update Basket Creates or updates the active basket for the user. This endpoint is responsible for granting points when purchases are made.

Sign In Flow

Used when the guest already has an account. In this experience, the guest clicks Sign In and enters their email address. They will receive an email with a link to authenticate. When the user clicks the link, they are redirected to the specified redirect_uri with the authorization code as a query parameter. Your integration then exchanges this authorization code for an access token, which allows you to make API calls on behalf of the user. After authentication, you can fetch their account details and create or update their basket to handle purchases and reward accrual. Endpoints used in this flow:
  1. Acquire Authorization Code Initiates sign-in and generates the authorization link sent to the user.
  2. Acquire Access Token Exchanges the authorization code for an access token used for authenticated requests.
  3. Get Account Retrieves the user’s account information.
  4. Create and Update Basket Creates or updates the active basket for the user. This endpoint is responsible for granting points when purchases are made.

Additional Endpoints to Enhance the Experience

EndpointsPurpose
Get User, Update User, Delete UserManage the user account.
Get Purchase, Get PurchasesDisplay a user’s past purchases.
Get Points Balance, Get RewardsShow the user’s current points and available rewards.
Get Points Products, Exchange Points ProductDisplay available points products and allow users to redeem them.
Get Communication Settings, Update Communication SettingsManage the user’s communication preferences.
Create Card, Get Cards, Delete CardCreate or manage a user’s linked payment cards. Once a card is registered, the user can pay with that card to accrue points without logging in, for merchants that use the Card-link loyalty type. The user will accrue points only if the transaction is processed directly through the card network. Payments made through Stripe or other payment service providers (aggregators) will not trigger accrual because the transaction is processed under the provider’s merchant ID rather than the merchant’s own.
Get Tags, Update Tags, Delete TagFetch and update user tags to enable targeted campaigns.