| [ Web Proxy ] |
| Viewing: https://stripe.com/de-lu/docs/billing/subscriptions/discounts | [Back] [Original] |
Create and manage coupons and promotion codes to apply discounts to a customers subscriptions, subscription items, or invoices using either the Dashboard or Stripe APIs. Use coupons to:
These are the differences between a coupon and a promotion code:
On this page, discount has two meanings. In everyday language, a discount is any price reduction. In the Stripe API, a Discount is a specific object that represents the application of a coupon to a customer, subscription, or invoice. When a customer redeems a coupon, Stripe creates a Discount object to track that redemption.
You can apply up to 20 discounts to a subscription, subscription item, or invoice. This limit is shared between coupons and promotion codes.
| Coupon | Promotion code | |
|---|---|---|
| Definition | API object that defines the discount logic. Apply these directly to a customers subscription using the Dashboard or API. | Customer-facing code that maps to your coupons. This is the string the customer enters at checkout. For example, FALLPROMO and SPRINGPROMO can both map to a single 25% off coupon. |
| Use case | Your sales team closes a deal with a customer for a negotiated 20% off their annual subscription. Your backend applies the discount directly, and the customer never types anything in. | Your marketing team launches a social media campaign and wants creators to share a code EXAMPLE2026 that gives new subscribers 25% off for 3 months. It only works for first-time customers with a minimum spend of 50 USD, and you want to cap it at 500 redemptions. |
| Restrict to a specific customer | ||
| Apply to first-time purchase only | ||
| Minimum spend to redeem | ||
| Deactivate without deletion | You can only delete, not deactivate coupons. Deletion doesnt remove existing discounts, but prevents new applications. Deleting a coupon will archive its associated promotion codes. | You can archive the promotion code by toggling active flag |
To use discounts for one-time payments, see Add discounts for one-time payments instead.
Service period coupons let you apply discounts based on when services were rendered, not when the invoice was issued. For example, a discount for January services applies to January, regardless of whether the invoice is generated in February. Sign up to join the private preview.
Interested in applying discounts by service period?
Enter your email to request access.
To reduce a customers charges, redeem a coupon to create a Discount object on a subscription or customer. Learn how to create and manage coupons in the following sections.
Create coupons in the Dashboard or with the API:
The following are all the settings for coupons. The name is the only setting you can edit after you create the coupon.
| Setting | Description |
|---|---|
| Name | The name of the coupon that appears on receipts and invoices. |
| ID optional | A unique identifier for the coupon in the API. If you leave this field blank, Stripe generates an ID for you. |
| Type | Determines whether a coupon discounts a subscription by a fixed amount or by a percentage. |
Percentage off or Discount amount | Indicates how much the coupon actually discounts. If you sell in multiple currencies, a single coupon can define different discount amounts for different currencies. Multi-currency coupons follow the same rules as multi-currency prices. |
| Apply to specific products optional | Limits the type of items that the coupon can apply to. |
| Duration | Indicates how long the coupon is valid for. |
| Redemption limits optional | Allows you to limit when a customer can redeem the coupon and the number of times a coupon can be redeemed. |
| Codes optional | Allows you to create promotion codes for the coupon. |
To set the products that are eligible for discounts, add the relevant product in the Apply to specific product field. Any promotion codes that are associated with the coupon are also restricted to this list of eligible products.
If you configure a coupon to apply to specific products and a subscription doesnt have any applicable products, no discount is applied when you add the coupon to the subscription.
When you make changes to a subscription, Stripe calculates the proration and applies any existing discounts. You cant discount proration line items further on the invoice thats generated.
After youve 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 customers existing subscription.
You can still create a subscription when a customer doesnt have a stored payment method if no immediate payment is required after you apply coupons to it.
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.
curl https://api.stripe.com/v1/checkout/sessions \ -u sk_test_wU7nrJCZspk1NPDxiQgAF05q: \ -d "line_items[][price]"=\ -d "line_items[][quantity]"=1 \ -d mode=subscription \ -d "discounts[][coupon]"="{{COUPON_ID}}" \ -d success_url="https://example.com/success""{{PRICE_ID}}"
You can delete coupons with the Dashboard or the API.
Deleting a coupon prevents it from being applied to future subscriptions or invoices, but it doesnt remove the discount from any subscription or invoice that already has it.
A coupons duration indicates how long the redeemed discount is valid for. Duration defaults to once, which applies only to the first invoice. Set duration=repeating with duration_in_months to apply a discount for multiple months, or duration=forever to apply it to all invoices indefinitely.
For example, a coupon for 50% off with duration_in_months=4 applies to all invoices in the 4-month period starting when the coupon is first applied. In a monthly subscription, the coupon applies to the first 4 invoices. In a yearly subscription, the 50% discount applies to the entire year if the subscription renews within the 4-month window. In a weekly subscription, it applies to every invoice in the first 4 months.
When a subscription uses a coupon with duration=once, the coupon is considered used after the invoice finalizes and is removed from the subscriptions discounts array:
discounts includes the discount object.discounts no longer includes that discount.This means a subscription may appear to have no discount even though a coupon was applied.
If you apply a coupon to a backdated subscription, the coupons duration starts counting from the backdated start date, not from when you make the API call. For repeating coupons, this means the backdated period consumes part of the coupons duration. The coupons duration_in_months must be longer than the backdated period if you want the discount to apply to invoices after the backdated period. See Backdating and discounts for more details.
Applying a coupon means attaching it directly to a subscription, customer, or invoice using the API or Dashboard. Redeeming a promotion code means a customer enters a code at checkout to activate the underlying coupon. Both actions count toward the same max_redemptions limit on the coupon.
Redemption limits cap how many times a coupon can be applied across all customers. For example, setting max_redemptions=50 means the coupon can only be applied 50 times total: once each to 50 different customers, 50 times to the same customer, or any combination until the limit is reached. When using promotion codes, a customers redemption of the code counts toward this limit.
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 has this coupons discount forever. New customers cant apply the coupon after the expiration date.
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 during payment.
If youve implemented the customer portal and turned on promotion codes, customers can apply a discount when upgrading or downgrading their existing subscriptions in the portal.
Subscriptions apply promotion code and price updates separately, which might cause unexpected updates. For example, a payment failure can cause a price upgrade to fail, but the promotion code included with the price upgrade succeeds.
The customer portal displays promotion codes that have been applied to a subscription. If you dont want to allow customers to apply the promotion code themselves or potentially share it with others, you should either set limits on the promotion code or apply a coupon directly.
Customize controls and limits on promotion codes by specifying eligible customers, first time orders, minimum order values, expiration dates, and redemption limits.
There are some restrictions to promotion codes.
You can create a promotion code in the Dashboard when you create a coupon.
The Code is case-insensitive and unique across active promotion codes for any customer. For example:
When you create a promotion code, it inherits the configuration of the associated coupon.
By configuring the promotion code settings, you can customize the following:
To limit a promotion code to a particular customer, complete these steps:
Restricts the coupon to customers who have no prior transaction history on your platform. This setting prevents customers from using the coupon if they:
To limit a promotion code to first-time customers, on the Create a coupon page, select Eligible for first-time order only.
To set an minimum amount that is eligible for a promotion code, on the Create a coupon page, select Require minimum order value and enter the minimum value.
Because promotion code restrictions are checked at redemption time, the minimum transaction amount only applies to the initial payment for a subscription.
If the coupon supports multiple currencies, the minimum amount can be different per-currency.
To set an expiration date for a promotion code, on the Create a coupon page, select Add an expiration date and the date and time at which the promotion code expires.
If the underlying coupon already has an expiration date set, then the promotion codes expiration date cant be later than the coupons.
For example, you might have plans to support a coupon for a year, but you only want it to be redeemable for one week after a customer receives it. To do this, set the coupons expiration date to one year from now, and set each the promotion codes expiration date to one week after its created.
To set the total number of times the promotion code can be redeemed by your customers, select Limit the number of times this code can be redeemed on the Create a coupon page and enter the number. See Redemption limits for details.
If the underlying coupon already has a maximum number of times set, then the promotion codes maximum redemptions cant be greater than the coupons.
To deactivate a promotion code, doing the following steps:
However, if the underlying coupon for a promotion code becomes invalid, all of its promotion codes become permanently inactive. Similarly, if a promotion code reaches its maximum redemption limit or its expiration date, it becomes permanently inactive. These promotion codes cant be reactivated.
After you create a promotion code, redeem a discount by applying the promotion code to a subscription. You can apply promotion codes two ways:
Enable promotion codes with the API by setting the allow_promotion_codes parameter in Checkout Sessions. When allow_promotion_codes is enabled on a Checkout Session, Checkout includes a promotion code redemption box for your customers to use.
You can add multiple coupons, promotion codes, or redeemed discounts to a customers list of charges. You can do this when creating a subscription or by updating a customers existing subscription.
We support multiple discounts on both subscriptions and subscription items.
When you create a subscription with stackable discounts, each discount applies to all items on the subscription. The order of the discounts is important if you use both amount_off and percent_off. For example, the following stacked discounts apply differently:
There are some restrictions to using multiple discounts.
discounts parameter.discounts has to be unique.You dont need to set discounts if you dont intend to make changes to existing discounts.
When updating discounts, you need to pass in any previously set coupon, promotion_code 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 youve already set more than one discount on a subscription with the new discounts parameter, you cant update the subscription with the deprecated coupon or promotion_code parameter. Similarly, you cant update a schedules phases with the deprecated coupon or promotion_code parameter if youve set more than one discount on a prior phase.
Updating discounts doesnt incur prorations or generate an invoice on its own. The new discounts are applied the next time the subscription creates an invoice.
Updating subscription-level promotion codes, coupons, or discounts by themselves doesnt create proration invoice items. Only changes that affect billable amounts for the current billing cycle create prorationsfor example, changing a subscription items price or quantity, adding or removing subscription items, or changing billing cycle anchors.
However, when you combine a discount change with a proration-triggering update (such as changing an item quantity and modifying a discount in the same API call), Stripe computes proration amounts using the subscriptions updated pricing and discounting state. The proration debit or credit reflects the modified discounts.
Although coupons are the most common way to discount a subscription, you can also do the following:
Of these methods, negative invoice items provide more detailed information as to what discount was created, when, and why.
| Web Proxy Viewer | New URL | Original Page |