| Previous Topic | Next Topic | |
|---|---|---|
| POS Module 6: Redemptions | POS Module 7: Check-in - Example Scenarios |
POS API Certification Tutorial - Module 7: Check-in - Concepts
Goal
Create a check-in for a loyalty guest and send check-in details to Punchh.
Prerequisites
- You must have read the Module 3: User Look-up, Module 5: Show Offers and Rewards After Look-up, and Module 6b: Process/Create Redemption tutorials.
- The user for which a check-in is created must be a loyalty guest.
Use Cases and Context
Check-in is a required step for loyalty guests and is done at the end, after the check is paid in full and closed out. Guests first identify themselves as a loyalty guest at the store. Next, the guest places an order for food. If a loyalty user has rewards or offers to redeem, the POS operator can select one at a time from the list to redeem the offers. The POS operator then attaches the loyalty guest to the transaction, and the loyalty guest makes the final payment. At the end of the transaction, the POS operator creates a check-in so that the loyalty guest can earn loyalty points or visits (depending on the program type of the business). This ensures that the loyalty guest is getting awarded appropriately for the final check amount. A check-in records the guest’s visit along with order details (e.g., menu items ordered, prices, etc.).
Applicable API Endpoints
| Endpoint Name/Path | Relevant Request Parameters | Relevant Response Parameters |
| Create Check-in POST {server-name}/api/pos/checkins |
pos_version transaction_no external_uid receipt_datetime revenue_id revenue_code subtotal_amount payable receipt_amount cc_last4 punchh_key The required parameters under the Menu Items object: - item_name - item_qty - item_amount - menu_item_type - menu_item_id - menu_family - menu_major_group - serial_number |
balance points_earned The Rewards object shows the rewards of the user: - id - name - points - discount_amount - end_date_tz - type |
Example Code
Create Check-in by Phone
curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
"phone": "1111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
}'
let requestBody = {
'phone': '1111111111',
'pos_version': 'v1',
'sequence_no': '1111',
'transaction_no': '111111111',
'receipt_datetime': '2022-06-15T01:00:00-07:00',
'menu_items': [
{
'item_name': 'Cheese Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'M',
'menu_item_id': 1111,
'menu_family': '001',
'menu_major_group': '001',
'serial_number': '1.0'
},
{
'item_name': 'BBQ Wings',
'item_qty': 1,
'item_amount': 7.86,
'menu_item_type': 'M',
'menu_item_id': 2222,
'menu_family': '002',
'menu_major_group': '002',
'serial_number': '2.0'
},
{
'item_name': 'Free Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'D',
'menu_item_id': 3333,
'menu_family': '003',
'menu_major_group': '003',
'serial_number': '3.0'
},
{
'item_name': 'Tax',
'item_qty': 1,
'item_amount': 1.00,
'menu_item_type': 'T',
'menu_item_id': 8888,
'menu_family': '',
'menu_major_group': '',
'serial_number': '4.0'
},
{
'item_name': 'Credit Card',
'item_qty': 1,
'item_amount': 8.86,
'menu_item_type': 'P',
'menu_item_id': 7777,
'menu_family': '',
'menu_major_group': '',
'serial_number': '5.0'
}
],
'employee_id': '001',
'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
'subtotal_amount': 7.86,
'receipt_amount': 7.86,
'payable': 8.86,
'cc_last4': '0001',
'punchh_key': 'PUNCHH_KEY_GOES_HERE',
'pos_type': 'brink',
'external_uid': 'EXTERNAL_UID_GOES_HERE',
'process': 'true',
'channel': 'pos'
};
const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins';
let headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
};
let options = {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)
};
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json
url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins"
payload = json.dumps({
"phone": "1111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(f"{response.status_code} - {response.text}")
Create Check-in by Email
curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
"email": "test@example.com",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
}'
let requestBody = {
'email': 'test@example.com',
'pos_version': 'v1',
'sequence_no': '1111',
'transaction_no': '111111111',
'receipt_datetime': '2022-06-15T01:00:00-07:00',
'menu_items': [
{
'item_name': 'Cheese Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'M',
'menu_item_id': 1111,
'menu_family': '001',
'menu_major_group': '001',
'serial_number': '1.0'
},
{
'item_name': 'BBQ Wings',
'item_qty': 1,
'item_amount': 7.86,
'menu_item_type': 'M',
'menu_item_id': 2222,
'menu_family': '002',
'menu_major_group': '002',
'serial_number': '2.0'
},
{
'item_name': 'Free Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'D',
'menu_item_id': 3333,
'menu_family': '003',
'menu_major_group': '003',
'serial_number': '3.0'
},
{
'item_name': 'Tax',
'item_qty': 1,
'item_amount': 1.00,
'menu_item_type': 'T',
'menu_item_id': 8888,
'menu_family': '',
'menu_major_group': '',
'serial_number': '4.0'
},
{
'item_name': 'Credit Card',
'item_qty': 1,
'item_amount': 8.86,
'menu_item_type': 'P',
'menu_item_id': 7777,
'menu_family': '',
'menu_major_group': '',
'serial_number': '5.0'
}
],
'employee_id': '001',
'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
'subtotal_amount': 7.86,
'receipt_amount': 7.86,
'payable': 8.86,
'cc_last4': '0001',
'punchh_key': 'PUNCHH_KEY_GOES_HERE',
'pos_type': 'brink',
'external_uid': 'EXTERNAL_UID_GOES_HERE',
'process': 'true',
'channel': 'pos'
};
const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins';
let headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
};
let options = {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)
};
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json
url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins"
payload = json.dumps({
"email": "test@example.com",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(f"{response.status_code} - {response.text}")
Create Check-in by Card Number
curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
"card_number": "1111111111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
}'
let requestBody = {
'card_number': '1111111111111111',
'pos_version': 'v1',
'sequence_no': '1111',
'transaction_no': '111111111',
'receipt_datetime': '2022-06-15T01:00:00-07:00',
'menu_items': [
{
'item_name': 'Cheese Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'M',
'menu_item_id': 1111,
'menu_family': '001',
'menu_major_group': '001',
'serial_number': '1.0'
},
{
'item_name': 'BBQ Wings',
'item_qty': 1,
'item_amount': 7.86,
'menu_item_type': 'M',
'menu_item_id': 2222,
'menu_family': '002',
'menu_major_group': '002',
'serial_number': '2.0'
},
{
'item_name': 'Free Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'D',
'menu_item_id': 3333,
'menu_family': '003',
'menu_major_group': '003',
'serial_number': '3.0'
},
{
'item_name': 'Tax',
'item_qty': 1,
'item_amount': 1.00,
'menu_item_type': 'T',
'menu_item_id': 8888,
'menu_family': '',
'menu_major_group': '',
'serial_number': '4.0'
},
{
'item_name': 'Credit Card',
'item_qty': 1,
'item_amount': 8.86,
'menu_item_type': 'P',
'menu_item_id': 7777,
'menu_family': '',
'menu_major_group': '',
'serial_number': '5.0'
}
],
'employee_id': '001',
'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
'subtotal_amount': 7.86,
'receipt_amount': 7.86,
'payable': 8.86,
'cc_last4': '0001',
'punchh_key': 'PUNCHH_KEY_GOES_HERE',
'pos_type': 'brink',
'external_uid': 'EXTERNAL_UID_GOES_HERE',
'process': 'true',
'channel': 'pos'
};
const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins';
let headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
};
let options = {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)
};
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json
url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins"
payload = json.dumps({
"card_number": "1111111111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(f"{response.status_code} - {response.text}")
Create Check-in by Redemption Code
curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
"redemption_code": "1111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
}'
let requestBody = {
'redemption_code': '1111111',
'pos_version': 'v1',
'sequence_no': '1111',
'transaction_no': '111111111',
'receipt_datetime': '2022-06-15T01:00:00-07:00',
'menu_items': [
{
'item_name': 'Cheese Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'M',
'menu_item_id': 1111,
'menu_family': '001',
'menu_major_group': '001',
'serial_number': '1.0'
},
{
'item_name': 'BBQ Wings',
'item_qty': 1,
'item_amount': 7.86,
'menu_item_type': 'M',
'menu_item_id': 2222,
'menu_family': '002',
'menu_major_group': '002',
'serial_number': '2.0'
},
{
'item_name': 'Free Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'D',
'menu_item_id': 3333,
'menu_family': '003',
'menu_major_group': '003',
'serial_number': '3.0'
},
{
'item_name': 'Tax',
'item_qty': 1,
'item_amount': 1.00,
'menu_item_type': 'T',
'menu_item_id': 8888,
'menu_family': '',
'menu_major_group': '',
'serial_number': '4.0'
},
{
'item_name': 'Credit Card',
'item_qty': 1,
'item_amount': 8.86,
'menu_item_type': 'P',
'menu_item_id': 7777,
'menu_family': '',
'menu_major_group': '',
'serial_number': '5.0'
}
],
'employee_id': '001',
'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
'subtotal_amount': 7.86,
'receipt_amount': 7.86,
'payable': 8.86,
'cc_last4': '0001',
'punchh_key': 'PUNCHH_KEY_GOES_HERE',
'pos_type': 'brink',
'external_uid': 'EXTERNAL_UID_GOES_HERE',
'process': 'true',
'channel': 'pos'
};
const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins';
let headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
};
let options = {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)
};
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json
url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins"
payload = json.dumps({
"redemption_code": "1111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(f"{response.status_code} - {response.text}")
Create Check-in by QR Code
curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
"user_as_qrcode": "P11111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
}'
let requestBody = {
'user_as_qrcode': 'P11111111111',
'pos_version': 'v1',
'sequence_no': '1111',
'transaction_no': '111111111',
'receipt_datetime': '2022-06-15T01:00:00-07:00',
'menu_items': [
{
'item_name': 'Cheese Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'M',
'menu_item_id': 1111,
'menu_family': '001',
'menu_major_group': '001',
'serial_number': '1.0'
},
{
'item_name': 'BBQ Wings',
'item_qty': 1,
'item_amount': 7.86,
'menu_item_type': 'M',
'menu_item_id': 2222,
'menu_family': '002',
'menu_major_group': '002',
'serial_number': '2.0'
},
{
'item_name': 'Free Pizza',
'item_qty': 1,
'item_amount': 2.86,
'menu_item_type': 'D',
'menu_item_id': 3333,
'menu_family': '003',
'menu_major_group': '003',
'serial_number': '3.0'
},
{
'item_name': 'Tax',
'item_qty': 1,
'item_amount': 1.00,
'menu_item_type': 'T',
'menu_item_id': 8888,
'menu_family': '',
'menu_major_group': '',
'serial_number': '4.0'
},
{
'item_name': 'Credit Card',
'item_qty': 1,
'item_amount': 8.86,
'menu_item_type': 'P',
'menu_item_id': 7777,
'menu_family': '',
'menu_major_group': '',
'serial_number': '5.0'
}
],
'employee_id': '001',
'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
'subtotal_amount': 7.86,
'receipt_amount': 7.86,
'payable': 8.86,
'cc_last4': '0001',
'punchh_key': 'PUNCHH_KEY_GOES_HERE',
'pos_type': 'brink',
'external_uid': 'EXTERNAL_UID_GOES_HERE',
'process': 'true',
'channel': 'pos'
};
const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins';
let headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
};
let options = {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)
};
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json
url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/checkins"
payload = json.dumps({
"user_as_qrcode": "P11111111111",
"pos_version": "v1",
"sequence_no": "1111",
"transaction_no": "111111111",
"receipt_datetime": "2022-06-15T01:00:00-07:00",
"menu_items": [
{
"item_name": "Cheese Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 1111,
"menu_family": "001",
"menu_major_group": "001",
"serial_number": "1.0"
},
{
"item_name": "BBQ Wings",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 2222,
"menu_family": "002",
"menu_major_group": "002",
"serial_number": "2.0"
},
{
"item_name": "Free Pizza",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3333,
"menu_family": "003",
"menu_major_group": "003",
"serial_number": "3.0"
},
{
"item_name": "Tax",
"item_qty": 1,
"item_amount": 1.00,
"menu_item_type": "T",
"menu_item_id": 8888,
"menu_family": "",
"menu_major_group": "",
"serial_number": "4.0"
},
{
"item_name": "Credit Card",
"item_qty": 1,
"item_amount": 8.86,
"menu_item_type": "P",
"menu_item_id": 7777,
"menu_family": "",
"menu_major_group": "",
"serial_number": "5.0"
}
],
"employee_id": "001",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": 8.86,
"cc_last4": "0001",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"pos_type": "brink",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"process": "true",
"channel": "pos"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
'User-Agent': 'Brink/POS/1.0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(f"{response.status_code} - {response.text}")
Workflow
The POS must call the Create Check-in API endpoint for every loyalty guest at the end of a transaction so that the guest can earn points for the transaction. The Create Check-in API call requires you to send the final check information with menu item data related to different items, such as: 1) menu items with menu item type M; 2) discounts both internal and Punchh with menu item type D; 3) service charges and delivery fees; 4) tips and gift card purchases with menu item type S; 5) tax applied to the check with menu item type T; and 6) the payment collected on the check with menu item type P. The payment should be the final payment amount. For example, if the guest pays $30 in cash for a $28 order, the payment should be $28.
The POS needs to send the menu items to Punchh in the format prescribed in the How To Send Menu Items to Punchh topic. The API developers are responsible for sending the menu item object exactly how Punchh specifies in that topic. There is no flexibility in the way menu items are sent in the Create Check-in API call.
Along with the menu item data, you need to send the POS version, transaction number, date and time of receipt, order amount before taxes, and the final payable amount at the POS, etc. See the Create Check-in endpoint topic for a list of required request parameters. The Create Check-in API response returns the points earned by the guest on the check-in.
Here is the basic workflow for the Create Check-in endpoint:
1. After a completed transaction, create a check-in for the guest by sending details to the Create Check-in endpoint. If the transaction is not a loyalty transaction, and the guest is not a rewards member, skip this step.
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 endpoint. See the Module 8a: Receipt Details tutorial.
Updating a Check-in
You can update a check-in call by enabling the pending points feature and then sending another Receipt Details API call with the change. See the Updating a Transaction section in the Module 8b: Updating/Voiding Transactions tutorial.
Best Practices
- Review How to Send Menu Items to Punchh to gain a better understanding of Punchh menu item requirements.
- A check-in may be registered only to one user. Attempting to process a check-in for the same transaction but for multiple users results in the following error: “This receipt has already been scanned by someone else.”
Related Topics
How To Send Menu Items to Punchh