Skip to main content

Overview

A discount is one line on one order saying money came off, and why.
A discount is not a promotion. A promotion is a rule — “20% off shoes in July” — that exists on its own, before anybody buys anything. A discount is the result on a particular order.Think of the promotion as the sign in the shop window and the discount as the line on the receipt. One promotion produces thousands of discounts over its life.
That separation is what lets an order stay truthful. The promotion can be edited, paused or deleted next month; the discount row on last month’s order still says exactly what that customer was given. It also means not every discount has a promotion behind it. When a support agent takes $10 off as a goodwill gesture, that’s a discount with no campaign attached — which is what the kind field distinguishes.

Discount attributes

Note the difference between value and amount. value is the rule — “10 percent”. amount is the money — ”-$12.00”. You need the rule to explain the discount and the amount to add up the order.

Reading discounts on an order

Whatever produced them, the rows read the same way:
Applying a coupon code, and what decides whether it’s accepted, belongs to Promotions.

Manual discounts

Sometimes there’s no promotion — a price match, an apology for a late delivery. Staff can add a discount directly:
Only manual discounts can be edited or deleted. Changing one that came from a promotion returns a 422.That row belongs to the promotion that created it. If staff could edit it, an order would start disagreeing with the promotion it claims to have used — and the reporting behind “how did the summer sale do” stops adding up.

How a discount is spread

An order-level discount isn’t kept as one lump sum. It’s divided across the items it applied to, in proportion to what they cost. This looks like an implementation detail until someone returns one item out of three. Then the question is: how much of that $30 discount belonged to the returned shirt? If the discount were one lump, you’d have to guess. Because it was spread at the time, the answer is already recorded, and the refund is right without anyone doing arithmetic on the phone. The same reasoning applies to tax — the tax on a partially returned order follows the same split.

Discounts on placed orders

Once an order exists, its discounts stop being regenerated. Editing a placed order re-applies the rows it already has rather than re-running today’s promotions. The alternative would mean an order quietly changing because a sale ended overnight — which is indefensible to a customer holding a confirmation email.