Order at Table Integration
Introduction
This guide covers how to build a loyalty integration for Order at Table systems. These are typically mobile web applications where customers scan a QR code at their table and order directly from their own device.
Order at Table integrations differ from kiosks and POS systems in several key ways: customers use their own mobile devices, authentication is typically email-based (passwordless), and the experience should feel native to mobile browsing.
In this tutorial
- 1. Adding Blocks to Page— Display loyalty prompts on the menu page
- 2. Identifying Customer— Email-based login, verification, and sign up
- 3. Showcasing Rewards and Vouchers— Display available offers to logged-in customers
- 4. Redeeming Offers— Lock and redeem vouchers and rewards
- 5. Finalising the Order— Basket with applied offers
- 6. Order Successful— Display earned points after payment
Main Loyalty Flow
This flow covers the complete Order at Table loyalty experience: from displaying offers to non-authenticated users, through login/signup, to redeeming offers and completing orders. Hover over the interactive previews to see which API endpoints are used at each step.
Adding Blocks to Page
Adding Blocks to Page
In an Order at Table integration, customers browse and order from their own mobile device. The loyalty integration should be seamlessly embedded into the ordering experience, with an offers section prominently displayed on the menu page.
For non-authenticated users, show a prompt to join the loyalty program or log in to access their rewards and offers.
Try it: Click the "Start earning rewards now!" banner to simulate a customer wanting to log in.
Identifying Customer
Unlike kiosks where customers scan a card, Order at Table integrations typically use email-based authentication. When a customer enters their email, first check if they already exist in the system.
Identifying Customer
Unlike kiosks where customers scan a card, Order at Table integrations typically use email-based authentication. When a customer enters their email, first check if they already exist in the system.
Authentication Flow:
- Customer enters their email address
- Call Find Contact to check if the email exists
- If found: Send verification code via Send Contact Verification Email
- If not found: Redirect to sign up form
Verification Code
For existing customers, send a verification code to their email. This provides a passwordless authentication experience that's secure and user-friendly on mobile devices.
Verification Code (continued)
For existing customers, send a verification code to their email. This provides a passwordless authentication experience that's secure and user-friendly on mobile devices.
If your Order at Table system already has its own authentication layer (e.g., customers log in to your app), you can skip this verification step and directly link the session to the customer's contact record using their authenticated email or user ID.
Sign Up (New Customers)
For new customers, collect their basic information to create a loyalty account. Keep the form simple to reduce friction.
Sign Up (New Customers)
For new customers, collect their basic information to create a loyalty account. Keep the form simple to reduce friction.
Recommended fields:
- Email (pre-filled from login attempt - required)
- First name (optional but highly recommended)
- Last name (optional but highly recommended)
- Birthdate (optional - useful for birthday rewards)
- Terms & Conditions acceptance
Showcasing Rewards and Vouchers
Once logged in, the customer sees their available offers directly on the menu page. This includes vouchers and collectable rewards that can be redeemed with their order.
Showcasing Rewards and Vouchers
Once logged in, the customer sees their available offers directly on the menu page. This includes vouchers and collectable rewards that can be redeemed with their order.
Displaying Offers:
- Show the customer's current point balance
- Display available vouchers with expiry dates
- Show collectable rewards (pre-redeemed rewards)
- Both vouchers and collectable rewards can be redeemed free of charge
- Provide a "See all" link to view all available offers
All Offers View
The "All offers" screen shows both available offers (vouchers and collectable rewards) and purchasable rewards that customers can redeem with their points.
All Offers View (continued)
The "All offers" screen shows both available offers (vouchers and collectable rewards) and purchasable rewards that customers can redeem with their points.
Vouchers
Pre-issued offers that customers receive through promotions, campaigns, or as gifts. Can be redeemed for free.
Collectable Rewards
Rewards that were pre-redeemed (points already deducted) but not yet collected. Can be redeemed for free.
Rewards
Items that customers can purchase with their points. Requires sufficient point balance to redeem.
Redeeming Offers
When a customer selects an offer, show a confirmation screen before applying it to their order. This prevents accidental redemptions.
Do you want to redeem this voucher now?
You can only use this voucher once.
Redeeming Offers
When a customer selects an offer, show a confirmation screen before applying it to their order. This prevents accidental redemptions.
For Order at Table, we recommend the Lock → Redeem approach:
- Lock Voucher — reserves the voucher when customer confirms
- Customer completes their order and pays
- On success: Redeem Voucher
- On failure/timeout: Release Voucher (or let it expire automatically)
This prevents vouchers from being permanently consumed if the customer abandons their order.
Applying discounts to the order is often the most complex part of the integration. To enable your Order at Table system to handle this correctly, you'll need to create custom attributes that define the discount logic.
Important: Custom attributes must be created on the correct entity:
- For Rewards: Create custom attributes on the Rewards entity
- For Vouchers: Create custom attributes on the Promotions entity (the parent of Vouchers)
Common custom attributes:
discount_type- Dropdown: percentage_discount, absolute_discount, or free_itemdiscount_value- Number field (e.g., 100 for 100% off = free item, or 5 for €5 off)product_code- SKU of the specific productcategory- If the reward applies to any product in a category
Offer Applied
After confirming, show a success message and add the discounted item to the customer's basket.
Offer Applied (continued)
After confirming, show a success message and add the discounted item to the customer's basket.
Finalising the Order
The basket shows all items including any applied offers. Customers can still add more offers before checking out.
Finalising the Order
The basket shows all items including any applied offers. Customers can still add more offers before checking out.
Basket Display:
- Show original price crossed out for discounted items
- Display the offer name that was applied
- Keep offers section visible for additional redemptions
- Show updated total reflecting all discounts
Order Successful
After successful payment, show the customer how many points they earned from their order.
Order successful
Your order was successfully processed, we're preparing it right away.
Order Successful
After successful payment, show the customer how many points they earned from their order.
The response from the Create and Process Order endpoint includes the points earned, which you can display to the customer.
Make sure to call Redeem Voucher and/or Collect Collectable Reward after successful payment to finalize any applied offers.
When creating Orders, the best practice is to create the Order as completely as you can. This includes linking Products and any Leat-actions that may have been undertaken in the Order process (e.g. Reward Redemptions, Voucher Redemptions, Giftcard Transactions etc.). Some best practices to take into account:
external_identifier:This is the main identifier from your system, usually a UUID or GUID or some other. It's imperative this is unique across all Orders.order_amount, total_order_amount, total_discount_amount:These are mainly for visual and reference purposes. When Orders are using in Order Actions (to make Points Transactions, for instance), these values will be largely ignored. To account for product-specific exclusions and rules, the order amounts used in calculations and actions will be calculated using the line items, charges and discounts. Still, please ensure these match the content to prevent any confusion.line_items.external_identifier:This is the unique identifier of this line item. Another line item of the same product should have their own unique identifier.line_items.total_amount:The total amount of a line items ought to be the line items' price times the quantity, minus the discount amount. The total amount does not include the total amounts of any sub line items. They are counted separately.line_items.product:For a host of features in Leat, it's imperative the product is linked (if present). The external identifier counts as the main unique identifier of the product, which is of course static for the same product across multiple line items and orders. If no product yet exists for the external identifier, one will be created. However, to fully enable the Product filtering feature, it's highly recommended to create the entire product library, including categories, upon integration installation.line_items.sub_line_items:Line items may include sub line items, like modifiers. Note: the total amounts of the sub line items count separately from the line item's total amount. Example: a line item for a 'Pizza Margherita' with a total amount of 1200 ($12) may include a sub line item for 'Extra Cheese' with a total amount of 200 ($2), which would bring the total order amount to 1400 ($14). The $2 from the sub line item is not included in the total amount on the parent line item. Sub line items are to be linked to products in the same way as their parent line items.line_items.result:This is the 'Leat result' of this line item, if any exists. Examples of this is when a customer buys a Gift card or a Voucher. This would be reflected as a line item on the Order and the resulting Giftcard Transaction (usually created after payment has succeeded) can be linked as a result. Highly recommended to link if present.applied_discounts:If one or more discounts have been applied to the order, these should be added here. Discounts are either applied on an Order level, or on a (Sub)Line Item level. In the latter, the applied discount should also be reflected in the discount amount on the individual (sub) line item(s) and/or charges. In such a case, the specific items should also be linked to the discount via the line items, sub line items and charges parameters.applied_discounts.offer:If the applied discount was the result of a Leat offer (e.g. Reward Redemption, Voucher Redemption etc.), this offer should be added to the discount. Highly recommended to link if present.charges:Charges are costs that are applied after (sub) line items. Examples include gratuity, service charges, shipping, wrapping or taxes (all of these are default Charge Definitions). In the case of taxes, there are only a few use cases in which taxes are to be included as separate charges. Most often, it's preferable to include them in the line items price instead of as separate charges. Charge Definitions are what Products are to Line Items.payments:Currently, only Leat-specific payments can be added here. Payment methods like credit card or cash are not to be sent in. If (part of) the order was paid using Leat payment methods (Giftcards, Prepaid), these should be linked here.
If you have any questions about Orders, please reach out to your partnership manager or contact us at dev@leat.com.
Applying discounts to the order is often the most complex part of the integration. To enable your Order at Table system to handle this correctly, you'll need to create custom attributes that define the discount logic.
Important: Custom attributes must be created on the correct entity:
- For Rewards: Create custom attributes on the Rewards entity
- For Vouchers: Create custom attributes on the Promotions entity (the parent of Vouchers)
Common custom attributes:
discount_type- Dropdown: percentage_discount, absolute_discount, or free_itemdiscount_value- Number field (e.g., 100 for 100% off = free item, or 5 for €5 off)product_code- SKU of the specific productcategory- If the reward applies to any product in a category
When an order is cancelled or returned, you'll need to correct the loyalty data. This involves correcting issued points and reversing any redeemed vouchers.
1. Correcting Issued Points
Use the Create and Process Order Return endpoint to subtract points that were originally awarded.
2. Reversing Redeemed Vouchers
Use Reverse Voucher Redemption to restore the voucher to its original state.
