Discount
This page is not the gift mechanism. A Discount entry only reports a deal the POS already applied to a transaction. It cannot redeem anything.
To redeem a gift, voucher, or punch card, use the asset object and send it in usedAssets[]. See Redeeming an asset.
Overview
The Discount object describes one entry in the appliedDeals[] array of a transaction. It records that a deal from the benefit engine was applied at the point of sale, and how much it was worth.
It is a report, not an instruction. Sending it does not create, grant, or redeem a benefit.
When to Use This Object
Include an entry in appliedDeals[] when:
- A deal returned by the benefit engine was applied during the transaction
- You need to report how much that deal reduced the total
For discounts that did not come from the benefit engine (manual price overrides, POS-side promotions, staff discounts), do not use appliedDeals. Report their sum in the transaction-level otherDiscountsTotal field instead.
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Identifier of the deal that was applied, as returned by the benefit engine |
appliedAmount | number | No | Value of the discount actually applied, in the smallest currency unit (e.g., cents or kuruş) |
No other fields are accepted. The transaction body is validated strictly, so any additional property is rejected with a 400.
Sample Payload
{
"key": "combo-meal-1",
"appliedAmount": 200
}
In context, inside a transaction:
"appliedDeals": [
{
"key": "combo-meal-1",
"appliedAmount": 200
}
]
Discount versus Asset
Both reduce what the customer pays, and the everyday words overlap, so the distinction is worth stating plainly:
appliedDeals[] (this page) | usedAssets[] (asset) | |
|---|---|---|
| Purpose | Reports a deal the POS already applied | Redeems a gift, voucher, or punch card |
| Effect | Reporting only | Consumes the member's asset |
| Identified by | key from the benefit engine | assetKey from member.assets[], or a code |
| Where the member's copy lives | Not held per member | member.assets[] on /member/details |
If you are implementing "the customer has a birthday gift and wants to use it", you need usedAssets[], not this page.
Related Use Cases
- Reporting deals applied through
/transaction - Displaying applied benefits in member receipts or records
Related Objects
asset: gifts, vouchers and punch cards, and how to redeem themtransaction: the payload that carriesappliedDeals[]