I think there’s a bit of confusion. The line item will show the cost of $1000 but with the discount the amount due will be $0. The order will still contain the $1000 for that item as well as having the amounts of the other items in the total.
Also orders can be scoped to item or the entire order. Here is an example order:
{
"order": {
"location_id": "{{location_id}}",
"customer_id": "{{customer_id}}",
"line_items": [
{
"quantity": "1",
"name": "deposit",
"base_price_money": {
"amount": 100000,
"currency": "USD"
},
"applied_discounts": [
{
"discount_uid": "12345"
}
]
},
{
"quantity": "1",
"name": "event",
"base_price_money": {
"amount": 400000,
"currency": "USD"
}
}
],
"discounts": [
{
"name": "deposit discount",
"percentage": "100",
"scope": "LINE_ITEM",
"type": "FIXED_PERCENTAGE",
"uid": "12345"
}
]
}
}
That will produce the following order:
{
"order": {
"id": "7A659DdcCaRq2CwWb5pdkaPBUcMZY",
"location_id": "3Z4V4WHQK64X9",
"line_items": [
{
"uid": "pxGTScW08Yqm0RjSLGjfxB",
"quantity": "1",
"name": "deposit",
"base_price_money": {
"amount": 100000,
"currency": "USD"
},
"gross_sales_money": {
"amount": 100000,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 100000,
"currency": "USD"
},
"total_money": {
"amount": 0,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 100000,
"currency": "USD"
},
"applied_discounts": [
{
"uid": "0ZdrFFd0x0A6Ck0i5AQEc",
"discount_uid": "12345",
"applied_money": {
"amount": 100000,
"currency": "USD"
}
}
],
"item_type": "ITEM"
},
{
"uid": "5BveGBghLnr2Euh6GriVf",
"quantity": "1",
"name": "event",
"base_price_money": {
"amount": 400000,
"currency": "USD"
},
"gross_sales_money": {
"amount": 400000,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 400000,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 400000,
"currency": "USD"
},
"item_type": "ITEM"
}
],
"discounts": [
{
"uid": "12345",
"name": "deposit discount",
"percentage": "100",
"applied_money": {
"amount": 100000,
"currency": "USD"
},
"type": "FIXED_PERCENTAGE",
"scope": "LINE_ITEM"
}
],
"created_at": "2023-03-22T00:17:23.665Z",
"updated_at": "2023-03-22T00:17:23.665Z",
"state": "OPEN",
"version": 1,
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 100000,
"currency": "USD"
},
"total_tip_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 400000,
"currency": "USD"
},
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
},
"net_amounts": {
"total_money": {
"amount": 400000,
"currency": "USD"
},
"tax_money": {
"amount": 0,
"currency": "USD"
},
"discount_money": {
"amount": 100000,
"currency": "USD"
},
"tip_money": {
"amount": 0,
"currency": "USD"
},
"service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
"source": {
"name": "Boats"
},
"customer_id": "W3C3EZFTZH18BFXX4M15TXNPQ0",
"net_amount_due_money": {
"amount": 400000,
"currency": "USD"
}
}
}
