Skip to main content
A coupon is a reusable discount definition. You create it once, then link it to one or more subscriptions via an association. Each association can be scoped to a time window and optionally targeted at a specific line item rather than the whole invoice.

Coupon types

TypeDiscount fieldCurrency requiredExample
percentagepercentage_offNo15% off the invoice
fixedamount_offYes$50 off

Cadence

Cadence controls how many billing cycles the discount repeats within an association’s active window.
CadenceBehavior
onceApplied to the first invoice of the association period only
repeatedApplied for duration_in_periods consecutive billing cycles
foreverApplied to every invoice for the life of the subscription

Validity controls

These fields live on the coupon itself and gate whether a new association can be created.
FieldPurpose
redeem_afterEarliest timestamp a coupon can be associated to a subscription
redeem_beforeExpiry timestamp. Associations cannot be created after this date. Existing associations created before expiry remain active.
max_redemptionsMaximum total associations allowed across all subscriptions
The total_redemptions counter increments when the association is created, not when an invoice is generated.

Coupon scope

Subscription level: discount applies to the invoice subtotal (or the running subtotal after earlier coupons have applied). Line-item level: discount applies to a specific price within the invoice before any subscription-level coupons run.

How multiple coupons apply

When an invoice has both line-item and subscription-level coupons:
  1. Line-item coupons apply first, reducing each targeted line item’s amount individually.
  2. Subscription-level coupons apply next, in association order, each seeing the subtotal left after the previous coupon.
  3. Wallet credits are deducted after all coupon discounts.
  4. Tax is calculated on MAX(subtotal - all_discounts, 0). Tax is never charged on discounted-away amounts.
Two 20% subscription-level coupons do not produce a 40% total discount. The second coupon applies to the amount remaining after the first. See Billing Calculation Order for the full worked example.

Coupon statuses

StatusMeaning
draftCreated but not yet usable
activeCan be associated to subscriptions
archivedNo longer usable for new associations
Only active coupons pass association validation.

Quick start

  1. Create a coupon with a type, value, and optional validity window.
  2. Apply it to a subscription at creation time or via subscription phases for scheduled windows.