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
/eventcalls for segmentation purposes
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
transactionId | string | Yes | Unique identifier for the transaction (e.g., POS receipt or order ID) |
openTime | string | Yes | ISO 8601 timestamp when the transaction was initiated |
dateTime | string | Yes | ISO 8601 timestamp when the transaction was finalized |
totalAmount | number | Yes | Total transaction value before discounts or taxes (in smallest currency) |
totalTaxAmount | number | Yes | Sum of taxes applied to the transaction |
totalGeneralDiscount | number | Yes | Aggregate discount not tied to specific items |
orderType | string | No | Optional context such as "dineIn" or "delivery" |
items | array | Yes | Line items representing products or services sold |
meansOfPayment | array | Yes | Breakdown of payment methods used (cash, card, points, etc.) |
tags | array | No | Optional metadata flags for internal segmentation or tracking |
employee | string | No | Identifier 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
transactionIdis unique within your system context. - The total of
meansOfPaymentshould equaltotalAmountto ensure payment consistency.
Related Use
This object is closely tied to member, payment, and assets when processing redemptions or tracking loyalty activity.