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)
openTimestringYesISO 8601 timestamp when the transaction was initiated
dateTimestringYesISO 8601 timestamp when the transaction was finalized
totalAmountnumberYesTotal transaction value before discounts or taxes (in smallest currency)
totalTaxAmountnumberYesSum of taxes applied to the transaction
totalGeneralDiscountnumberYesAggregate discount not tied to specific items
orderTypestringNoOptional context such as "dineIn" or "delivery"
itemsarrayYesLine items representing products or services sold
meansOfPaymentarrayYesBreakdown of payment methods used (cash, card, points, etc.)
tagsarrayNoOptional metadata flags for internal segmentation or tracking
employeestringNoIdentifier of the staff member or operator handling the transaction

Sample Payload

{
"transaction": {
"transactionId": "TX12345",
"openTime": "2025-06-17T11:30:00Z",
"dateTime": "2025-06-17T11:45:00Z",
"totalAmount": 5000,
"totalTaxAmount": 800,
"totalGeneralDiscount": 500,
"orderType": "dineIn",
"items": [
{
"lineId": "1",
"code": "PLU123",
"name": "Burger",
"departmentCode": "FOOD",
"departmentName": "Main Dishes",
"quantity": 2,
"grossAmount": 3000,
"netAmount": 2500,
"action": "sale",
"tags": ["combo"]
},
{
"lineId": "2",
"code": "PLU124",
"name": "Fries",
"departmentCode": "FOOD",
"departmentName": "Sides",
"quantity": 1,
"grossAmount": 2000,
"netAmount": 1500,
"action": "sale",
"tags": []
}
],
"meansOfPayment": [
{
"type": "CASH",
"amount": 4000
},
{
"type": "CARD",
"amount": 1000
}
],
"tags": ["delivery"],
"employee": "Jane Doe"
}
}
info
  • All monetary amounts should be expressed in the smallest unit of the currency (e.g., cents or kuruş).
  • Ensure transactionId is unique within your system context.
  • The total of meansOfPayment should equal totalAmount to ensure payment consistency.

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