When a customer pays with a discount code or gets an automatic discount, we store it on the order: the code's name and the amount it took off. You set codes up on the Growth page; this article covers where the discount shows once the order exists.
On the order page
Open the order from Orders. The "Payment" card lists "Subtotal", then a "Discount" line with the code in brackets and the amount as a negative, then "Shipping", "VAT" and "Total". If the order has no code name, the line reads "Discount" alone. The "VAT" line only appears when VAT was added on top of your prices.
The customer sees the discount in two places: a "Discount" row in the order confirmation email (the amount, without the code), and the code with the amount on the order page in their account on your store.
How VAT is worked out
- If your prices exclude VAT, we take the discount off first and charge VAT on what is left plus shipping. A 100 riyal cart with a 20 riyal code and 25 riyals of shipping pays 15% VAT on 105 riyals, so 15.75 riyals.
- If your prices include VAT, the discount comes off the VAT-inclusive total, and the VAT inside it shrinks with it. No VAT line is added at checkout.
- A free shipping threshold is checked against the subtotal after the discount, so a code can take an order below it and the customer pays shipping.
On the tax invoice
The tax invoice has no discount line. We spread the discount across the order's product lines in proportion to their value, down to the halala, so each line shows a lower unit price than your shop price. VAT on each line is worked out on that lower price. Shipping stays its own line and takes no share of the discount.
The invoice's totals block still has a "Discount" row, and it always prints 0.00. That is expected: the discount is already inside the line prices, and the "Amount due" comes to what the customer paid. If your accountant asks why the prices look lower, point them to the order's "Payment" card, which shows the code and the amount.
Cancelling or refunding
A code's use is counted when the order is created. Cancelling or refunding the order does not give the use back, so a code with a "Total uses" limit stays one use closer to "Used up". If you need room for more orders, open the code and raise "Total uses".
Profit on Analytics is counted after discounts and refunds, without VAT or shipping.