Skip to main content

Discount Codes

Discount codes are applied directly to subscriptions at the time of creation, offering recurring or one-time discounts.

Fields​

FieldDescription
CodeUnique code, uppercase
NameDiscount name
DescriptionDiscount details
Typepercentage or fixed_amount
Fixed amount (cents)For fixed_amount type
PercentageFor percentage type (max 100%)
Durationonce, repeating, or forever
Duration in monthsFor repeating, how many months the discount lasts
Maximum redemptionsTotal global uses allowed
Times redeemedUsage counter
Valid from / untilValidity period
Statusactive, expired, or depleted

Discount Duration​

DurationDescription
onceApplied only to the first invoice
repeatingApplied for N consecutive months
foreverApplied indefinitely while the subscription is active

Restrictions​

RestrictionDescription
Minimum amountMinimum subscription amount to use
First use onlyValid only for new customers
Valid cyclesWhich billing cycles accept the discount

Application​

FilterDescription
ProductsList of products where the discount applies
PlansList of plans where the discount applies

Status​

StatusDescription
activeValid and usable
expiredOutside the validity period
depletedRedemption limit reached