Flexible coupons and promotion codes
Add discounts to subscriptions and subscription items using coupons and promotion codes.
Redeem coupons to apply discounts to the subscriptions you offer. You can also use coupons to create promotion codes to share with your customers. Customers can redeem these promotion codes to apply discounts to their subscriptions.
You can use coupons and promotion codes to:
- Apply one or more discounts to every invoice, a specific invoice, or for a certain duration of time
- Apply one or more discounts to every subscription a customer has or to specific subscriptions
- Apply one or more discounts to specific subscription items
- Reduce invoice amounts by a percentage or a flat amount
You can also define a coupon that a customer must redeem by a certain date, or that’s limited to a set number of redemptions across all of your customers.
To use discounts for one-off payments, see Add discounts for one-off payments.
Coupons
To apply discounts to a customer or a customer’s charges, redeem coupons into discounts. Learn how to create and manage coupons in the following sections.
Create a coupon
Create coupons in the Dashboard or with the API:
Set eligible products
When you make changes to a subscription, any existing discounts are applied when proration is calculated. You can’t discount proration line items further on the invoice that’s generated.
Apply coupons to subscriptions
After you’ve created coupons, create a discount by applying them to a subscription. You can apply the coupon when you create the subscription or by updating a customer’s existing subscription.
You can still create a subscription when a customer doesn’t have a stored payment method if no immediate payment is required after you apply coupons to it.
Apply coupons to customers
If you add a coupon to a customer, the coupon applies to all subscriptions for that customer, including subscriptions added later. To prevent discounting all recurring charges for a customer, add coupons to subscriptions instead of customers.
A coupon attached to a subscription takes priority over a coupon attached to a customer. If you add coupons to a subscription, any coupons attached to the customer are not automatically applied. You must add the customer coupons to the subscription if you want those to apply as well.
Apply coupons to Checkout
Apply coupons to subscriptions in a Checkout Session by setting the discounts
parameter in the API. To create a session with an applied discount, pass the coupon ID in the coupon
parameter of the discounts
array. This coupon overrides any coupon on the customer.
If you’re creating a subscription with an existing customer, any coupon associated with the customer is applied to the subscription’s invoices.
Delete coupons
You can delete coupons with the Dashboard or the API.
Deleting a coupon prevents it from being applied to future subscriptions or customers, but it doesn’t remove the discount from any subscription or customer that already has it.
Coupon duration
A coupon’s duration indicates how long the redeemed discount is valid for. For example, a coupon for 50% off with a duration of 4 months applies to all invoices in the 4-month period starting when the coupon is first applied. If a customer applies this coupon to a yearly subscription during the coupon’s 4-month period, the 50% discount applies to the entire yearly subscription. In a monthly subscription, the coupon applies to the first 4 months. For a weekly subscription, a 4-month coupon applies to every invoice in the first 4 months.
If you’re configuring a coupon’s duration in the API, when you use the value repeating
you must specify duration_
as the number of months that the coupon repeatedly applies to. If you set the duration to once
, the coupon applies only to the first invoice. If you set the duration to forever
, the coupon applies to all invoices indefinitely.
Redemption limits
Redemption limits apply to the coupon across every customer. For example, if you limit the number of times a coupon can be redeemed to 50, you can apply it to your customers only 50 times. This can be one time each for 50 different customers, one customer 50 times, or multiple customers multiple times until the max of 50 times.
If you set a coupon to last forever when a customer uses it but the coupon has an expiration date, any customer given that coupon will have that coupon’s discount forever. No new customers can apply the coupon after the expiration date.
Promotion codes
Promotion codes are customer-facing codes that you create for coupons. For example, FALLPROMO and SPRINGPROMO can both point to a single 25% off coupon. You can share promotion codes directly with your customers to use at checkout.
If you’ve implemented the customer portal and turned on promotion codes, customers can apply a discount when upgrading or downgrading their existing subscriptions in the portal.
Customize controls and limits on promotion codes by specifying eligible customers, first time orders, minimum order values, expiration dates, and redemption limits.
Restrictions
There are some restrictions to promotion codes.
- You can’t apply a promotion code with amount restrictions on:
- Customer objects
- Subscription Item objects
- Invoice Item objects
- Subscriptions objects when you make an update
- Future phases on Subscription Schedule objects
Create promotion codes
When you create a promotion code, it inherits the configuration of the associated coupon.
Promotion code configurations
By configuring the promotion code settings, you can customize the following:
- Which customers are eligible to use a promotion code
- How many times a customer can redeem a promotion code
- When a promotion code expires
- Set a minimum amount a promotion code can apply to
Limit by customer
Limit by first time order
Set a minimum amount
Customize expirations
Limit redemptions
Deactivate promotion codes
Apply promotion codes to subscriptions
After you create a promotion code, redeem a discount by applying the promotion code to a subscription. You can apply promotion codes two ways:
- When you create a subscription
- When you update a customer’s existing subscription
Add promotion codes to Checkout
Enable promotion codes with the API by setting the allow_promotion_codes parameter in Checkout Sessions. When allow_
is enabled on a Checkout Session, Checkout includes a promotion code redemption box for your customers to use.
Promotion code field at checkout
Stackable coupons and promotion codes
You can add multiple coupons, promotion codes, or redeemed discounts to a customer’s list of charges. You can do this when creating a subscription or by updating a customer’s existing subscription.
We support multiple discounts on both subscriptions and subscription items.
Note
You can start using the new discounts
parameter on any subscription. We automatically clear out the singular discount
field when discounts
with more than one entry is passed in an update.
Restrictions
There are some restrictions to using multiple discounts.
- You can set up to 20 entries in the
discounts
parameter. - Each entry in
discounts
has to be unique. - You can not pass in a coupon and a promotion code created from the same coupon.
- You can not pass in a coupon and a discount that is generated from the same coupon.
- Redeemed discounts must already be attached to the customer or subscription that you’re updating.
Update a subscription
You don’t need to set discounts
if you don’t intend to make changes to existing discounts.
When updating discounts
, you need to pass in any previously set coupon
, promotion_
or discount
you want to keep on the subscription.
Pass discounts = ""
to clear all discounts from the subscription. When a subscription has no discounts, the customer-level discount, if any, applies to invoices.
If you have already set more than one discount on a subscription with the new discounts
parameter, you can not update the subscription with the deprecated coupon
or promotion_
parameter. Similarly, you can not update a schedule’s phases with the deprecated coupon
or promotion_
parameter if you have set more than one discount on a prior phase.
Updating discounts
does not incur prorations or generate an invoice on its own. The new discounts are applied the next time the subscription creates an invoice.
Alternative discount methods
Although coupons are the most common way to discount a subscription, you can also do the following:
- Add a negative customer balance to the customer.
- Add negative invoice items.
- Add a second price that is a cheaper version of a product’s usual price.
Of these methods, negative invoice items provide more detailed information as to what discount was created, when, and why.