Coupons
Coupons work very much like a regular product, but they reduce the totals instead of increasing them.
Smart Transaction
{
// ...
"basket"
: {
"products"
: [
{
"item_type"
:
"sub_transaction"
,
// ...
"sub_basket"
: [
// ...
{
"id"
: 2,
"item_type"
:
"coupon"
,
"desc"
:
"Coupon €10"
,
"quantity"
: 1,
"priceOne"
: 1000,
"tax"
: 0
},
// ...
]
}
]
},
// ...
}
These are the fields:
Attribute |
Type |
Description |
item_type |
string |
Must be coupon. |
id |
int |
Unique ID as handle for later changes. |
desc |
string |
Coupon name. |
quantity |
number |
Item count (usually 1). |
priceOne |
number |
Gross unit amount. This is the value of the coupon. |
tax |
number |
The value-added tax (VAT) rate in percent (usually 0). |