0Pricing
Stripe Payments & SaaS Billing Systems · Lesson

Coupons, Discounts, and Promotion Codes

Boost conversions and retention with Stripe coupons, customer-facing promotion codes, and discounts applied to subscriptions and invoices.

Coupons, Discounts, and Promotion Codes is a free Stripe Payments & SaaS Billing Systems lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Stripe Payments & SaaS Billing Systems learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Discounts Matter

Discounts drive sign-ups, win-back, and loyalty. Stripe has first-class support for coupons and promotion codes on subscriptions.

Coupons vs Promotion Codes

A coupon defines the discount logic. A promotion code is a customer-facing string that points to a coupon.

  • Coupon: 20% off
  • Promo code: SAVE20

Percentage vs Amount Off

A coupon discounts either a percentage or a fixed amount in a currency.

const coupon = { percent_off: 20 };
const price = 5000;
const discounted = price * (1 - coupon.percent_off / 100);
console.log(discounted);

Duration of a Coupon

Coupons have a duration: once (one invoice), repeating (a set number of months), or forever.

Creating a Coupon

You create coupons in the dashboard or via API.

const coupon = await stripe.coupons.create({
  percent_off: 25,
  duration: 'repeating',
  duration_in_months: 3
});

Adding a Promotion Code

Wrap a coupon in a promo code so customers can type it at checkout.

const promo = await stripe.promotionCodes.create({
  coupon: coupon.id,
  code: 'SAVE25'
});

Restrictions on Promo Codes

Promotion codes can be limited: first-time customers only, a minimum order amount, a max redemption count, or an expiry date.

Applying at Checkout

Enable the promo code field in Checkout so customers can self-apply codes without code changes.

const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  allow_promotion_codes: true,
  line_items: [{ price: 'price_123', quantity: 1 }]
});

Applying to an Existing Subscription

You can attach a discount to a running subscription, useful for retention offers when someone tries to cancel.

await stripe.subscriptions.update('sub_123', {
  discounts: [{ coupon: 'coupon_abc' }]
});

Discounts and Proration

Discounts interact with proration when plans change mid-cycle. Always test the resulting invoice preview to confirm the final charge.

Tracking Redemptions

Monitor how often each promo code is used and its impact on conversion, so you can retire underperforming offers.

Quick Check

What is the difference between a coupon and a promotion code?

Recap

You learned to offer discounts in Stripe:

  • Coupons define the discount; promo codes expose it to customers
  • Percentage or amount off, with once/repeating/forever duration
  • Restrictions like first-time-only and expiry
  • Apply at checkout or to existing subscriptions for retention

Frequently asked questions

Is the “Coupons, Discounts, and Promotion Codes” lesson free?

Yes — the full text of “Coupons, Discounts, and Promotion Codes” is free to read here on the web, and the Stripe Payments & SaaS Billing Systems course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Stripe Payments & SaaS Billing Systems course, upgrade to CoddyKit PRO.

What will I learn in “Coupons, Discounts, and Promotion Codes”?

Boost conversions and retention with Stripe coupons, customer-facing promotion codes, and discounts applied to subscriptions and invoices. You practise Stripe Payments & SaaS Billing Systems with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Stripe Payments & SaaS Billing Systems?

No prior experience is required. Stripe Payments & SaaS Billing Systems on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Coupons, Discounts, and Promotion Codes” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Stripe Payments & SaaS Billing Systems lesson?

Yes. Every Stripe Payments & SaaS Billing Systems lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Handling Trial Periods and Plan Upgrades
  2. Implementing Prorations and Metered Billing
  3. Subscription Lifecycle Management & Events
  4. Coupons, Discounts, and Promotion Codes
← Back to Stripe Payments & SaaS Billing Systems