Create Transaction

​

Use the Create Transaction API to create a transaction for a customer (provided this functionality is enabled for the business by Punchh). The transaction registers the visit of the customer at a certain store, but the customer will not earn loyalty (points, etc.). One of the identifiers (email, phone, card_number, user_as_qrcode, single_scan_token or redemption_code) must be provided along with location_key.

Headers

  • This is a combination of unique API key as well as business key (UUID) as the Authorization header.

  • Short code for locale variant (e.g., fr-ca, es-ES, en-EN, etc.)

Body

application/json
  • Order amount before any taxes (sum of all amounts minus any discounts). Same as receipt_amount and subtotal_amount.

  • Channel through which the check-in was requested. Possible values are: online_order, pos, web, mobile, dashboard, chatbot, kiosk.

  • Email address of the user

  • 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
  • Amount paid after applying discounts and adding any taxes or service charges. For example, if the order amount is $10, the values of the receipt_amount and subtotal_amount parameters will be $10. If a $2 discount is applied, subtotal_amount becomes $8. However, if there are $3 service charges and $1 tax, the value of the payable parameter becomes $12 (10 – 2 + 3 + 1 = 12).

  • Unique Punchh key

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

  • Timestamp of receipt per ISO 8601 format including TZ offset from UTC (YYYY-MM-DDThh:mm:ss-±hh:mm)

  • 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 receipt_amount in the API request.

  • Trasaction number

  • Loyalty card number of the user

  • Last 4 digits of the user's credit card number

Responses

  • application/json
Request Example for post/api/pos/transactions
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/transactions \
  --request POST \
  --header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
  --header 'Accept-Language: en' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "test@example.com",
  "receipt_amount": 40,
  "receipt_datetime": "2018-12-17T03:14:00-08:00",
  "sequence_no": 12345,
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "transaction_no": 3502723201,
  "subtotal_amount": 40,
  "channel": "pos",
  "revenue_id": "Dine In",
  "revenue_code": "4",
  "employee_id": "135",
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "payable": 44.5,
  "menu_items": [
    {
      "item_name": "REG SIERRA MIST",
      "item_qty": 1,
      "item_amount": 40,
      "menu_item_type": "M",
      "menu_item_id": "2032",
      "menu_family": "106",
      "menu_major_group": "152",
      "serial_number": "1"
    }
  ]
}'
{
  "anniversary": null,
  "avatar_remote_url": "URL_GOES_HERE",
  "birthday": "1999-01-01",
  "created_at": "2012-11-21T10:52:32Z",
  "email": "test@example.com",
  "fb_uid": "FB_UID_GOES_HERE",
  "first_name": "FIRST_NAME_GOES_HERE",
  "gender": "male",
  "id": 542057,
  "last_name": "LAST_NAME_GOES_HERE",
  "updated_at": "2015-05-15T18:53:38Z",
  "balance": {
    "banked_rewards": "259.00",
    "membership_level": "CAPADDICT",
    "membership_level_id": 16,
    "membership_program_id": null,
    "net_balance": 259,
    "net_debits": 0,
    "pending_points": 0,
    "points_balance": 59,
    "signup_anniversary_day": "05/06",
    "total_credits": 259,
    "total_debits": 0,
    "total_point_credits": 185,
    "total_redeemable_visits": 12,
    "expired_membership_level": "CAPREHENSIVE",
    "total_visits": 8
  },
  "address_line1": null,
  "zip_code": null,
  "phone": null,
  "rewards": [
    {
      "created_at": "2015-05-08T13:30:18Z",
      "end_date_tz": "2016-05-08T06:59:59Z",
      "start_date_tz": "2015-05-07T18:30:00Z",
      "updated_at": "2015-05-08T13:30:18Z",
      "id": 619162,
      "image": "IMAGE_URL_GOES_HERE",
      "description": "Happy Birthday! Here's a 9\" Sub for you to enjoy.",
      "discount_amount": 0,
      "name": "9\" Sub!",
      "points": 0
    }
  ]
}