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).

Headers

  • Token token Location API key from the Punchh platform. btoken Business API key from the Punchh platform.

  • Set to application/json

Body

application/json
  • Order amount before taxes, calculated as the sum of item_amount for M line items in menu_items minus the item_amount for D line items; S, T, and P line items are excluded. See the description of the D, S, T, and P items in the menu_items.menu_item_type request parameter. The value of this parameter should match subtotal_amount.

    ⚠️ Important: During create check-in, loyalty points and visits are calculated based on the individual item amounts in the menu_items array, not directly from receipt_amount.

  • Code of the currency in ISO 4217 format

  • 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

    Properties: 8
  • Total amount the customer paid after taxes, service charges, and discounts

  • Enter one of the following values for the Punchh single scan flow payment:

  • Name of the POS system

  • Version number of the POS system

  • Date/time when the check was opened in ISO 8601 format (YYYY-MM-DDTHH:MM:SS)

  • Single 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.

  • Order amount before taxes, calculated as the sum of item_amount for M line items in menu_items minus the item_amount for D line items; S, T, and P line items are excluded. See the description of the D, S, T, and P items in the menu_items.menu_item_type request parameter. Same as receipt_amount. For historical reasons, include this parameter along with amount in the API request.

  • Unique 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.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/pos/payments
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": 10.72,
  "subtotal_amount": 10.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"
}