Discounts
Support for discounts
Our channel partners may offer multiple types of discounts or special offers on items. However, when orders are sent to Deliverect, only an overall order discount is supported.
How discounts are shown in orders
The total discount is shown as a negative value when we send an order to a POS, which is then subtracted from the total order's value. The POS should clearly show the discounted total.

For an order with a €1 discount, it is displayed as "discountTotal": -100,
on the POS order tab.

Additional Discount Details
If the channel provides additional information about the discount, an additional "discounts"
object is provided in the payload like in the below example;
{
"discounts": [
{
"type": "order_flat_off",
"provider": "channel",
"name": "Test discount",
"channelDiscountCode": "test 1234",
"referenceId": 1,
"value": 400,
"amount": 400,
"amountRestaurant": 200,
"amountChannel": 200
}
]
}
Discounted Items
If discounts are applicable to a specific item(s), the discount details array above will include a "referenceId"
This id will be included on each item which the discount applies to.
In the example below, the single item purchased 'Lasagna' specifies in the "discountReferenceIds" array, the integer value 1
which references the "20% off all main meals" discount which has "referenceId": 1,
With other discount types, such as 'free delivery', as it does not apply to any individual item, it's "referenceId"
will not be associated with any single item.
Note that the "discountTotal": -150,
is sent to the POS, despite three applied discounts. This is due to a standard behaviour to pass only a total of the discounts funded by the restaurant, signified by the "amountRestaurant"
vs "amountChannel"
{
"items": [
{
"plu": "LASAGNA",
"name": "Lasagna",
"price": 1500,
"quantity": 1,
"productType": 1,
"discountReferenceIds": [1]
}
],
"payment": {
"amount": 1500,
"type": 1,
"due": 1500,
"rebate": 0
},
"discountTotal": -150,
"discounts": [
{
"type": "item_percent_off",
"name": "20% off all main meals",
"provider": "shared",
"referenceId": 1,
"value": 300,
"amount": 300,
"amountRestaurant": 150,
"amountChannel": 150
},
{
"type": "delivery_discount",
"provider": "channel",
"name": "FREE delivery for all purchases over $10 paid with credit card",
"referenceId": 2,
"value": 490,
"amount": 490,
"amountRestaurant": 0,
"amountChannel": 490
},
{
"type": "service_fee_discount",
"provider": "channel",
"name": "50% OFF SERVICE - MEMBERS DISCOUNT",
"referenceId": 3,
"value": 220,
"amount": 220,
"amountRestaurant": 0,
"amountChannel": 220
}
]
}
Discounts Glossary
In the "discounts"
object, you will find information such as the discount type
, name
, and amount
. Each parameter is further explained in the table below (view all order attributes).
Parameters | Meaning | Type |
---|---|---|
discounts | Order discounts | Array [object] |
discounts.type | Mapped channel discount type from the list of discount types in Deliverect. | String |
discounts.provider | The issuer of the discount. In other words, who funds the discounted amount list of provider types in Deliverect. | Enum |
discounts.name | The name of the discount. | String |
discounts.channelDiscountCode | The unique discount code used by the channel | String |
discounts.referenceId | A unique number that is assigned to the discount and used to reference the discount on individual items on the order. | Integer |
discounts.value | The fixed value or percentage covered by the discount, which is stored with precision 2 (e.g., $1.50 becomes 150, 25.1% becomes 2510) | Integer |
discounts.amount | The actual amount discounted (e.g., for 10% off on an order totaling $50, the value would be 1000 and the amount 500. | Integer |
discounts.amountRestaurant | Total amount of discount funded by the restaurant/merchant | Integer |
discounts.amountChannel | Total amount of discount funded by the channel | Integer |
Updated 2 days ago