Create Payment
The Create Payment API commits the payment via the PAR Payment Services Gateway.
For more information, see: Creating Payment
Headers
Token token
The Location API key from the Punchh platform located under Store Locations > All Store Locations > [Choose your location] > POS tab > Location key
btoken
The API key for the business, located in the Punchh platform. Note: This can be obtained only from Punchh administrators (e.g., Customer Success Manager).
For assistance with any API keys, reach out to your Punchh Customer Success Manager (CSM) or Implementation Manager (if applicable).
- Type: stringAuthorization
Token token Location API key from the Punchh platform. btoken Business API key from the Punchh platform.
- Type: stringContent
- Type Set to application/json
- Type: numberamountrequired
Receipt amount excluding taxes and inclusive of discounts
- Type: stringcurrency
_code requiredCode of the currency in ISO 4217 format
- Type: array object[] · Menu Items (Array Object)required
The array contains one or more menu item objects added to an order. You send one of these arrays per API call. See How To Send Menu Items to Punchh
- Type: integerpayablerequired
Total amount the customer paid after taxes, service charges, and discounts
- Type: stringpayment
_type requiredEnter one of the following values for the Punchh single scan flow payment:
-
Credit Card = CreditCard
-
Recurring = recurring See Single Scan Flow
-
- Type: stringpos
_type requiredName of the POS system
- Type: stringpos
_version requiredVersion number of the POS system
- Type: stringpunchh
_key requiredValue of the Punchh QR code or Punchh barcode
- Type: stringreceipt
_datetime requiredDate/time when the check was opened in ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
- Type: stringsingle
_scan _code requiredSingle scan code of the user is a required parameter when the user makes a payment through the single scan flow. The single scan code identifies the user making the payment.
- Type: numbersubtotal
_amount requiredReceipt amount excluding taxes and inclusive of discounts
- Type: stringtransaction
_no requiredUnique identifier for the transaction request. Regardless of success or failure, only one transaction number per request. This is NOT to be confused with the POS check number.
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/payments \
--request POST \
--header 'Authorization: Token token="LOCATION_KEY_GOES_HERE" btoken="BUSINESS_KEY_GOES_HERE"' \
--header 'Content-Type: application/json' \
--data '{
"payment_type": "CreditCard",
"single_scan_code": "SINGLE_SCAN_CODE_GOES_HERE",
"payable": 46,
"pos_type": "Aloha",
"pos_version": "v1.0",
"cc_last4": "",
"employee_id": "01",
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"revenue_id": "111",
"revenue_code": "CODE_GOES_HERE",
"amount": 12.72,
"subtotal_amount": 12.72,
"currency_code": "USD",
"receipt_datetime": "2020-02-25T20:10:45+05:30",
"punchh_key": "PUNCHH_KEY_GOES_HERE",
"transaction_no": "3387553",
"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"
},
{
"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"
}
]
}'
{
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"transaction_no": "5678",
"payment_reference_id": "1562",
"status": "Processing",
"payment_type": "CreditCard",
"payment_transaction_id": "TRANSACTION_ID_GOES_HERE",
"response_message": "CREATED",
"created_at": "2021-05-01T12:00:00.000Z",
"updated_at": "2021-05-01T12:00:00.000Z",
"card_type": "VIC"
}