BETA: Please note that the current endpoints are considered beta. It is possible there may be changes before these endpoints are finalised.

Bills

Push a bill

Push a bill

post /organizations/{organizationId}/locations/{locationId}/bills

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
locationIdstringpathLocation ID

Request Body

PushBillRequestBody
{
  "bill": {
    "balance": 4000,
    "billRef": "A-54313002",
    "completedAt": "2021-08-04T04:38:00Z",
    "createdAt": "2021-08-04T04:38:00Z",
    "currency": "NZD",
    "isClosed": false,
    "items": [
      {
        "amount": 10000,
        "name": "Bacon and Egg roll",
        "quantity": 1,
        "subItems": {
          "amount": 100,
          "name": "subItem1"
        },
        "type": "ITEM"
      },
      {
        "amount": -1000,
        "name": "Credits",
        "quantity": 1,
        "type": "ADJUSTMENT"
      },
      {
        "amount": -1000,
        "name": "Discount",
        "quantity": 1,
        "type": "DISCOUNT"
      }
    ],
    "payments": [
      {
        "name": "Cash",
        "tip": 0,
        "total": 2000
      },
      {
        "name": "Card",
        "tip": 0,
        "total": 1000
      },
      {
        "name": "App-Payment",
        "tip": 1500,
        "total": 3000
      }
    ],
    "placeRef": "4",
    "tax": 300,
    "tipsAllowed": true,
    "total": 7000,
    "updatedAt": "2021-08-04T04:38:00Z"
  }
}

Responses

204: No Content response.
400: invalid_item_quantity: Bad Request response.

Accept a bill payment

Used to signal a payment has been processed by your integration.

post /organizations/{organizationId}/locations/{locationId}/bills/{billId}/payment/{paymentId}/accept

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
locationIdstringpathLocation ID
billIdstringpath
paymentIdstringpathPayment ID

Responses

204: No Content response.

Reject a bill payment

Used to signal a payment was unable to be processed by your integration.

post /organizations/{organizationId}/locations/{locationId}/bills/{billId}/payment/{paymentId}/reject

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
locationIdstringpathLocation ID
billIdstringpath
paymentIdstringpathPayment ID

Request Body

RejectBillPaymentRequestBody
{
  "reason": "The bill is fully paid."
}

Responses

204: No Content response.

Models

Bill

NameTypeDescription
completedAtstring(optional) When the bill was completed.
createdAtstringWhen the bill was created.
updatedAtstringWhen the bill was last updated.
balanceintegerBalance remaining on this bill. Total, minus any payments already made on the bill.
billRefstringThe bill ID is the identifier for this bill from a non-LOKE system, the remote service's bill ID.
currencystring(enum)Currency used on this bill.
"AUD", "SGD", "GBP", "NZD", "USD"
isClosedbooleanBill is closed or not. A bill can be closed before being completed if needed.
placeRefstring(optional) The service reference (table number, room number, QR code, etc)
taxinteger(optional) Tax amount included on bill.
tipsAllowedboolean(optional) Can tips be attached to this bill.
totalintegerTotal amount that must be paid on this bill, excluding payments. Inclusive of any tax. The total must equal the sum of the items.
itemsBillItem[]List of items associated with this bill. *NOTE: may include discounts.*
paymentsBillPayment[]Any existing payments made on this bill.

BillItem

NameTypeDescription
idstring(optional) ID of the product item.
namestringDisplay name of the product on this line item.
amountinteger The tax inclusive unit price of one item. The price is represented in the lowest denomination (e.g., cents). For discounts this should be negative. Excludes the price of subItems.
quantityintegerThe quantity of items ordered. Quantity must be 1 or more.
taxinteger(optional) The included tax for one item. The tax is represented in the lowest denomination (e.g., cents). For discounts this should be negative. Excluded the tax from subItems.
typestring(enum)Use item for products on the bill, discount for reductions applied, adjustments for additional charges (ie: weekend surcharge).
"item", "discount", "adjustment"
subItemsBillSubItem[](optional)

BillSubItem

NameTypeDescription
namestringDisplay name of the option, variation, combo choice, etc.
amountintegerThe tax inclusive cost of a single instance of this sub-item.

BillPayment

NameTypeDescription
namestringMethod of payment or payment label.
refIdstring(optional) A reference to the record of this payment to another system.
paymentinteger(optional) Amount actually paid by the user, including tips.
tipinteger(optional) Tip included in in this payment.
totalintegerThe total amount paid on this payment instance. Inclusive of tips and loyalty credit. Successful payments should be listed as a positive integer. Reversals as a negative integer.

PushBillRequestBody

NameTypeDescription
billBill

RejectBillPaymentRequestBody

NameTypeDescription
reasonstring(optional) A human readable reason the bill payment is rejected.

In this article