Create Loyalty Check-in

​

Creates a loyalty check-in for an order against a receipt when the user’s access token or authentication token is not available at the time of creating the check-in in the Punchh system -- for example, in the case of future-dated orders. The user is identified using email address, phone number, or user ID, with user ID given top priority if multiple look-up parameters are passed in the API.

Phone number will work only if it is set up as a unique parameter in the Punchh platform. The option to validate the uniqueness of phone number across guests must be enabled. Contact your Punchh representative to update this Punchh platform configuration.

Headers

  • Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".

  • Set this header to application/json.

Body

application/json

At least one of user_id, phone, or email is required.

  • Unique ID generated by your system. We use this to prevent duplicates in case the same transaction gets triggered twice.

  • Amount paid after applying discounts and adding any taxes or service charges. For example, if the order amount is $10, the values of the receipt_amount and subtotal_amount parameters will be $10. If a $2 discount is applied, subtotal_amount becomes $8. However, if there are $3 service charges and $1 tax, the value of the payable parameter becomes $12 (10 – 2 + 3 + 1 = 12).

  • Order amount before taxes, calculated as the sum of all item amounts minus any discounts. This is the amount used to calculate loyalty points/visits. The value of this parameter should match subtotal_amount. For example, if the order amount is $10, both receipt_amount and subtotal_amount will be 10. If a $2 discount is applied, both will be 8.

  • Timestamp of the receipt per ISO 8601, in YYYY-MM-DDThh:mm:ssZ format

  • The location where the check-in occurred, as configured in the Punchh platform via Store Locations > All Store Locations > Edit Location. This is generally provided by the business.

  • Order amount before taxes (sum of all item amounts minus any discounts). Same as receipt_amount. For historical reasons, this parameter is included along with receipt_amount in the API request.

  • Receipt number or transaction number on the receipt. In case of a redemption associated with the order, the same transaction number must be sent for both check-ins and redemptions.

  • Last 4 digits of credit card number

  • Channel through which the check-in was requested. Possible values are:online_order, pos, web, mobile, dashboard, chatbot, kiosk

  • Email address of the user in the Punchh system. You can get this value from the User object, email parameter in the response of a successful Online Ordering sign-up / sign-in API call or Mobile sign-up / sign-in API call.

  • ID of the employee who took the order. In case of a system order, it can be a system-generated ID.

  • Name of the employee who took the order. In case of a system order, it can be the name of the system.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api2/dashboard/checkins
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/checkins \
  --request POST \
  --header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "111111",
  "transaction_no": 5678,
  "cc_last4": 4387,
  "employee_id": 7,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "store_number": "58",
  "menu_items": [
    {
      "item_name": "White rice",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 3419,
      "menu_family": "800",
      "menu_major_group": "152",
      "serial_number": "1.0"
    },
    {
      "item_name": "Brown rice",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 3418,
      "menu_family": "800",
      "menu_major_group": "152",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free rice",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3419,
      "menu_family": "800",
      "menu_major_group": "152",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "payable": "9.00",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "revenue_id": "REVENUE_ID_GOES_HERE",
  "revenue_code": "REVENUE_CODE_GOES_HERE",
  "channel": "online_order",
  "state": "committed",
  "receipt_datetime": "2023-11-20T15:23:20+05:30"
}'
{
  "first_name": "FIRST_NAME_GOES_HERE",
  "last_name": "LAST_NAME_GOES_HERE",
  "checkins": 2,
  "points": 22,
  "checkin": {
    "created_at": "2015-11-26T10:57:06Z",
    "external_uid": "EXTERNAL_UID_GOES_HERE",
    "checkin_id": 7415394,
    "pending_points": 0,
    "pending_refresh": false,
    "points_earned": 11,
    "bar_code": "BARCODE_GOES_HERE"
  }
}