Skip to main content
This walkthrough configures a quantity discount on a PIT line item, with a cadence different from the billing period, and checks the result against a few months of usage.

Step 1: Decide how many units are discounted per cycle

Pick the number of free units the customer gets per cadence cycle. For this walkthrough, we’ll use 500 discounted units.

Step 2: Decide the cadence

Decide how often the discounted pool refreshes, and how that relates to the billing period. For this walkthrough, set the discount to refresh quarterly while billing happens monthly:
  • value: 500
  • cadence: P3M (quarterly)
This means a single pool of 500 units is shared across all three months of the quarter and depletes chronologically as usage comes in.

Step 3: Decide whether to cap the pool within the cadence window

If you want to limit how many of the 500 units can be applied within the cadence window itself (distinct from the lifetime cap below), set max_per_period. For this walkthrough, leave it unset — the full 500 per quarter is available.

Step 4: Decide on a lifetime cap, if any

If the discount should stop permanently after a certain total has been consumed across the life of the contract, set max_lifetime. For this walkthrough, leave it unset.

Step 5: Decide on proration for partial cadence windows

If the contract might start partway through a cadence window, decide whether the pool should be reduced proportionally (prorate_stub=true) or remain at its full size for the partial window (prorate_stub=false, the default). For this walkthrough, leave the default.

Step 6: Add a label and set the order, if stacking

Set a label for how the discount appears on the invoice, for example “Included usage.” If this line item has other discounts too, set the order field — quantity discounts should generally come first, since they reduce units before dollar-based discounts apply.

Step 7: Save and preview

Save the configuration, then preview the invoice across a few months to confirm the pool depletes as expected:
January: Used 200 → Discounted: 200, Pool left: 300, Billable: 0
February: Used 250 → Discounted: 250, Pool left: 50,  Billable: 0
March:    Used 100 → Discounted: 50,  Pool left: 0,   Billable: 50 → $2.50 at $0.05/query
April (Q2): Pool resets to 500.

What’s next

  • If this line item uses volume or tiered pricing, see the volume pricing doc for how the quantity discount can shift which bracket usage falls into.
  • To stack this with a percent or fixed discount, see the percent discount doc.