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
  • Authorization
    Type: string

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

  • Content-Type
    Type: string

    Set to application/json

Body
application/json
  • amount
    Type: number
    required

    Receipt amount excluding taxes and inclusive of discounts

  • currency_code
    Type: string
    required

    Code of the currency in ISO 4217 format

  • menu_items
    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

  • payable
    Type: integer
    required

    Total amount the customer paid after taxes, service charges, and discounts

  • payment_type
    Type: string
    required

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

  • pos_type
    Type: string
    required

    Name of the POS system

  • pos_version
    Type: string
    required

    Version number of the POS system

  • punchh_key
    Type: string
    required
  • receipt_datetime
    Type: string
    required

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

  • single_scan_code
    Type: string
    required

    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.

  • subtotal_amount
    Type: number
    required

    Receipt amount excluding taxes and inclusive of discounts

  • transaction_no
    Type: string
    required

    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": 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"
}