Skip to main content

Transaction

Overview​

The transaction object represents a completed customer purchase and is central to loyalty processing. It is used to record purchases, trigger benefit calculations, log redemptions, award points, and support segmentation.

When to Use This Object​

Include the transaction object in API calls when:

  • Logging a purchase via /transaction
  • Associating a loyalty payment with a purchase via /payment
  • Providing event context in /event calls for segmentation purposes

Field Reference​

FieldTypeRequiredDescription
transactionIdstringYesUnique identifier for the transaction (e.g., POS receipt or order ID)
dateTimestringYesISO 8601 timestamp when the transaction was finalized
totalAmountnumberYesTotal transaction value before discounts or taxes (in smallest currency)
otherDiscountsTotalnumberNoOther discounts not managed by the loyalty engine
typestringNoOptional context such as "dineIn" or "delivery". Responses echo this back as orderType
itemsarrayYesLine items representing products or services sold
paymentsarrayYesBreakdown of payment methods used (cash, card, points, etc.). Responses echo this back as meansOfPayment
tagsarrayNoOptional metadata flags for internal segmentation or tracking
employeestringNoIdentifier of the staff member or operator handling the transaction

Sample Payload​

{
"transaction": {
"transactionId": "TX12345",
"dateTime": "2025-06-17T11:45:00Z",
"totalAmount": 5000,
"otherDiscountsTotal": 500,
"type": "dineIn",
"items": [
{
"lineId": 1,
"code": "PLU123",
"name": "Burger",
"departmentCode": "FOOD",
"departmentName": "Main Dishes",
"quantity": 2,
"subtotal": 3000,
"total": 2500,
"tags": ["combo"]
},
{
"lineId": 2,
"code": "PLU124",
"name": "Fries",
"departmentCode": "FOOD",
"departmentName": "Sides",
"quantity": 1,
"subtotal": 2000,
"total": 1500,
"tags": []
}
],
"payments": [
{
"type": "CASH",
"amount": 4000
},
{
"type": "CARD",
"amount": 1000
}
],
"tags": ["delivery"],
"employee": "Jane Doe"
}
}
info
  • All monetary amounts must be integers in the smallest unit of the currency (cents or kuruş). totalAmount and payments[].amount reject decimals outright, so 99.90 fails validation where 9990 succeeds.
  • Ensure transactionId is unique within your system context.
  • The total of payments should equal totalAmount to ensure payment consistency.
  • Unknown fields are rejected. The request body is validated strictly, so any key not listed above returns a 400 rather than being ignored.
Request and response use different names

Three fields are named one way when you send them and another way when you read them back. Send the request name; expect the response name.

You sendYou read backNotes
paymentsmeansOfPaymentSame array, renamed internally
typeorderTypeSame value, renamed internally
(nothing)openTimeSet by the API to your dateTime. Never send it on /transaction

dateTime is the only timestamp you send.

This object is closely tied to member, payment, and assets when processing redemptions or tracking loyalty activity.