Online Ordering Integrations

Description

Online ordering systems are used to take orders online, apply redemptions and discounts, and pay for the order. They are hosted on the back-end computing of a brand, and the user interface is run on the end user’s computer and operated by the end user. These kinds of integrations use mostly Punchh Online Ordering APIs.

The common workflow in each of these kinds of systems looks like this:

1. Sign up / sign in - This scenario authenticates a loyalty user, and returns an access token that can be used for subsequent steps for redemptions and check-ins. This workflow must run before the order is paid, and if redemptions are desired, the user must be authenticated before claiming redemptions.

2. Build order - In this scenario, the user builds an order of goods and services to buy.

3. Pay - In this scenario, the user pays using a payment card of some kind.

When integrating with Punchh, the workflow needs some extra steps:

1. Query redemptions - In this scenario, the online ordering application checks the order against loyalty offers and adjusts the order with discounts from the loyalty orders, thus turning them into redemptions. This workflow occurs after the order is built and the loyalty user is authenticated, and before the order is paid.

2. Commit redemptions - In this scenario, which occurs after the order has been paid, the redemptions are committed and removed from the user’s loyalty account.

3. Check in - After the order is paid, the order is sent to the loyalty system so loyalty credits can be properly credited to the loyalty user.

Information Resources

Study the following to learn about integrations that use Punchh Online Ordering APIs.

1. Start with Getting Started With Online Ordering API Integrations.

2. See Online Ordering API Certification Tutorials. This guide includes a state machine flow of how order creation works on an online ordering system, and how to create payloads for redemptions and check-ins. This is the first of many adjacent documents that you can read on the PAR Developer Portal to understand how Punchh Online Ordering APIs work.

3. The sign-up and user look-up flows authenticate a user and result in the acquisition of an access token that enable other API calls to be made on behalf of the user. These require the following API calls:

  • a. Send OTP - Sends a one time password (OTP) to the user via email or SMS message using Advanced Authentication to sign up / sign in.

  • b. Verify OTP - This verifies the OTP token and returns an access token for that user.

  • c. Create New User - This enables the creation of a new loyalty user. This is a legacy method for user authentication and is not recommended for new applications. This returns an access token for that user.

  • d. Fetch Account Balance of User - For existing loyalty users, this confirms that a user is valid, and checks the credits, rewards, and offers available to the user.

4. There are many APIs related to redemptions, but the success path of query and activate redemptions (Redemptions 2.0) flows require calls to the following APIs:

5. The check-in process requires the following API calls:

  • a. Create Loyalty Check-in - This API is called to send the order (which may contain additional line items for redemptions) to Punchh.

Sample Applications

  • x-pch-digest generator - This downloadable sample application shows how to construct an x-pch-digest HTTP header for authenticating Punchh Online Ordering API calls, and proves it by making Punchh Online Ordering API calls using a properly generated x-pch-digest HTTP header.

  • API Payload Generator - This online application shows how to generate and validate payloads for redemptions and check-ins.

Postman Collections

Examples

These are examples of online ordering integrations:

  • Olo