What a quantity discount is
A quantity discount is a “free units” or “first N discounted” mechanism: customers get a pool of discounted units that refreshes on a cadence, depletes against usage, and resets at each cadence boundary.Scope
The core mechanic
- Pool created: a fresh pool of discounted units is created at each cadence boundary.
- Deplete chronologically: periods within the cadence window consume from the pool in order.
- Bill the remainder: usage beyond the pool is billable.
Cadence relative to billing period
How it treats PIT and POT identically
The discount engine treats PIT and POT identically: it receives a quantity and subtracts discounted units from it, without knowing or caring whether that quantity came from a PIT meter or a POT allocation. For PIT, this looks like usage being offset month to month:Proration of the pool for partial cadence windows
When a cadence window is only partially covered (for example, a contract starting mid-month), the pool itself can be reduced proportionally, controlled by theprorate_stub flag.
prorate_stub=false), the full pool applies even to a partial window. This is distinct from POT’s own proration: for POT, pricing proration adjusts the dollar amount for a partial period, while discount proration (when enabled) adjusts the quantity pool. These operate on different axes and aren’t expected to interact directly.
A prorated pool rarely lands on a whole number, as above, so a rounding setting (floor, ceil, or half_up) resolves it to a usable unit count. The default is floor, the conservative direction for the business, rounding the pool down rather than granting a fractional unit’s worth extra.
Bracket-shift effects on volume and tiered pricing
Because the quantity discount reduces the billable quantity before the pricing model runs, it can shift which bracket a customer lands in:-
Volume pricing: reducing quantity can move a customer into a lower bracket, which sometimes carries a higher rate. Counterintuitively, the discount can increase the invoice in that scenario.
- Tiered pricing: reducing quantity simply means fewer tiers get filled. There’s no equivalent paradox here: the total is always less than or equal to what it would be without the discount.
Stacking with other discounts
Quantity discounts reduce units first; dollar and percent discounts apply afterward to whatever amount results. Multiple quantity discounts (for example, a daily one and a monthly one) can coexist via theorder field, each depleting its own pool independently.
What’s deferred to a later phase
Carryover of unused units, expiry models beyond use-it-or-lose-it, grant-timing controls (such as delaying availability after payment), per-event scope, and prepaid entitlement balance tracking are all out of scope currently. The discount does have its own date range, separate from thevalue/cadence/proration settings above, but it can only be a sub-range of the line item’s own duration, not an independent window that extends beyond it.