| Previous Topic | Next Topic | |
|---|---|---|
| POS Module 7: Check-in - Concepts | POS Module 8a: Receipt Details - Concepts |
POS API Certification Tutorial - Module 7: Check-in - Example Scenarios
Prerequisites
- You must have read the scenario assumptions.
- Review Module 7: Check-in - Concepts
- Review Module 6c: Voiding Redemptions - Example Scenarios
General Tasks for Creating Check-in
1. After a check is closed and paid and redemptions (if any) are successfully processed, create a check-in for the guest by sending details to the Create Checkin API. Note: If the transaction is not a loyalty transaction and the guest is not a rewards member, skip this step. The Create Checkin API call should be made only after the check is paid fully and closed.
2. After a successful check-in, or if the guest is not a loyalty member, submit the transaction details to Punchh using the Receipt Details API.
Possible Scenario
The following scenario is based on the assumptions here.
Story Line
It is important for Rachel to know if a customer is a loyalty account holder because that will determine whether she has to create a check-in for the transaction. Ross walks into the store to order his usual morning latte worth $4 and an avocado toast worth $8. Rachel asks him for his account information (i.e., his phone number), and he pays for his order. Only after the check is paid and closed does Rachel perform the check-in at POS.
The POS system makes a Create Checkin API call, which associates today’s order with Ross's loyalty account so that he can earn points. Per the brand’s banked rewards program structure, Ross earns 1 point for every dollar spent, and every 25 points earned translates into a $1 reward. Hence, Ross gets 12 points from this transaction as the order total is $12. Ross already had 15 points in his account from previous transactions, so after this transaction Ross now has 27 total points. Ross earns a $1 reward from 25 accumulated points, so he now has 2 points left in his account.
Code Sample (Direct API Integration)
The following code sample contains the API request and response for the transaction between the POS and Punchh based on this story line. After Ross makes the payment for the order, Rachel after a successful look-up assigns the transaction to Ross and creates a check-in for the order. The POS calls the Create Checkin API with the following required information:
- POS version: V03
- Transaction number: 3984
- Receipt date and time: 2023-01-03T08:59:18Z
- Revenue ID: Dine In
- Revenue code: 4
- Menu items
- Subtotal amount: $12
- Receipt amount: $12
- Payable: $12.20
- Punchh key: PUNCHH_KEY_GOES_HERE
- POS type: Micros
- External UID: EXTERNAL_UID_GOES_HERE
- Channel: pos
- Email: 2125554626-619@phone.punchh.com
The Create Checkin API returns the following information about the points earned for the transaction:
- First name: Ross
- Last name: Geller
- Banked rewards: $1
- Points Balance: 2
- Total point credits: 27 (12+15=27)
| Request Body | Response Body |
| API endpoint name: Create Checkin POST {server-name}/api/pos/checkins { "pos_version": "V03", "sequence_no": "2124", "transaction_no": "3948", "receipt_datetime": "2023-01-03T08:59:18Z", "revenue_id": "Dine In", "revenue_code": "4", "menu_items": [ { "item_name": "Iced Latte", "item_qty": 1, "item_amount": 4, "menu_item_type": "M", "menu_item_id": 7, "menu_family": "800", "menu_major_group": "152", "serial_number": "1.0" }, { "item_name": "Avocado Toast", "item_qty": 1, "item_amount": 8, "menu_item_type": "M", "menu_item_id": 3, "menu_family": "800", "menu_major_group": "152", "serial_number": "2.0" }, { "item_name": "Tax", "item_qty": 1, "item_amount": 0.20, "menu_item_type": "T", "menu_item_id": "8888", "menu_family": "", "menu_major_group": "", "serial_number": "3.0" }, { "item_name": "Credit Card", "item_qty": 1, "item_amount": 12.20, "menu_item_type": "P", "menu_item_id": "7777", "menu_family": "", "menu_major_group": "", "serial_number": "4.0" } ], "employee_id": "7", "employee_name": "Rachel Green", "subtotal_amount": 12, "receipt_amount": 12, "payable": 12.20, "cc_last4": "3453", "punchh_key": "PUNCHH_KEY_GOES_HERE", "pos_type": "micros", "external_uid": "EXTERNAL_UID_GOES_HERE", "process": "true", "channel": "pos", "email": "2125554626-619@phone.punchh.com" } For examples of how to make this call using various programming languages, see Module 7: Example Code. |
{ "address_line1": null, "anniversary": null, "avatar_remote_url": null, "birthday": null, "city": "Austin", "created_at": "2023-01-03T08:59:18Z", "email": "2125554626-619@phone.punchh.com", "email_verified": false, "fb_uid": null, "first_name": "Ross", "age_verified": false, "privacy_policy": false, "gender": null, "id": 219416757, "last_name": "Geller", "state": null, "updated_at": "2023-01-03T13:33:21Z", "zip_code": null, "test_user": false, "phone_verified": true, "user_joined_at": "2023-01-03T13:33:21Z", "balance": { "banked_rewards": "1.00", "membership_level": null, "membership_level_id": null, "net_balance": 1.0, "net_debits": 0.0, "pending_points": 0.0, "points_balance": 2.0, "signup_anniversary_day": "01/09", "total_credits": 27.0, "total_debits": "0.0", "total_point_credits": 27.0, "total_redeemable_visits": 0, "expired_membership_level": null, "total_visits": 3, "initial_visits": 0, "unredeemed_cards": 0 }, "rewards": [], "selected_card_number": null, "selected_discount_amount": null, "selected_rewards": [], "selected_redeemables": [], "selected_redeemables_cards": [], "selected_coupons": [], "selected_tip_amount": [], "user_digest": "USER_DIGEST_GOES_HERE", "phone": null } |