What is a discount code? How they work and when they’re worth running

Connect
Connect

The world’s most successful platforms and marketplaces, including Shopify and DoorDash, use Stripe Connect to embed payments into their products.

Learn more 
  1. Introduction
  2. Key takeaways
  3. What is a discount code?
  4. How do discount codes work?
  5. What types of discount codes can businesses offer?
  6. How do discount codes affect pricing and margins?
    1. Gross margin compression
    2. Incremental revenue vs. cannibalization
    3. LTV effects
    4. Accounting considerations
  7. What are the risks of running discount code campaigns?
    1. Code leakage
    2. Stacking and exploitation
    3. Training customers to wait
    4. Fraud and abuse
    5. Complexity at scale
  8. Are discount codes worth it for your business?
  9. How Stripe Connect can help

A discount code is a customer-facing string of characters that unlocks a conditional price reduction at checkout. Businesses use them to move inventory, acquire customers, and entice lapsed ones, but a poorly designed campaign can decrease margins, train customers to wait for deals, or leak far beyond its intended audience. But when a campaign’s executed well, it can increase conversion significantly. In fact, 15% of online shoppers regularly abandon purchases if they don’t have a digital coupon or discount code.

Below, we’ll explain how discount codes work, the risks involved, and how to assess whether a campaign is worth running.

Key takeaways

  • Discount codes apply conditional logic at checkout, with rules that govern expiration, usage limits, minimum order values, and customer eligibility.

  • A discount code’s financial impact extends beyond the face value of the discount; it affects gross margin, customer lifetime value (LTV), and how revenue is recorded.

  • Codes work best when they’re tied to a specific objective with measurable incremental revenue; without that structure, they tend to erode full-price revenue over time.

What is a discount code?

A discount code is a string of letters, numbers, or both that a customer enters at checkout to receive a reduced price, a free item, or some other benefit on their order. When a customer submits the code, the system checks it against a database of active promotions and verifies that the conditions for use are met. It then applies the corresponding discount to the order total.

How do discount codes work?

Besides validation, discount codes often have several conditions that must be met for processing; these can be simple or layered. These are some common ones:

  • Expiration dates: Codes can be live for a day, a week, or indefinitely.

  • Usage limits: A code might be valid for a single use, once per customer, or a fixed total number of redemptions across all customers.

  • Minimum order value: Many codes apply only when the cart exceeds a value threshold, such as $50 or $100.

  • Product or category restrictions: A code might apply only to a specific stock-keeping unit (SKU), a product category, or items not already on sale.

  • Customer eligibility: Some codes are issued only to specific accounts or first-time buyers.

What types of discount codes can businesses offer?

Not all discount codes reduce the price the same way. It’s worthwhile to learn the differences between discount types because the format you choose has important implications for your margins and customer behavior.

  • Percentage off: This discount scales with the order value, which means you absorb more of the cost on larger orders. A 25% off code on a $200 order costs you $50; on a $40 order, it costs $10. That variable exposure matters when you forecast the campaign’s cost.

  • Fixed amount off: This is a flat dollar reduction. The cost is predictable per redemption, but the effective discount rate varies by order size. A $10 code on a $20 order is a 50% discount; on a $100 order, it’s a 10% discount. Minimum order requirements are often paired with fixed-amount codes to prevent the former scenario.

  • Free shipping: Technically, this is a discount on a line item rather than the product price, but it functions the same way at checkout. Because shipping costs are actual costs you incur, free shipping codes have a direct impact on margin.

  • Buy X, get Y: This is a conditional discount rather than a simple reduction (e.g., spend $75 and get a free item, buy three and pay for two). These offers require more complicated configuration and usually go beyond basic coupon mechanics.

  • Trial or access codes: Entering one of these codes unlocks a free trial period, a reduced first-month price, or access to a tier that’s otherwise kept behind a paywall. Stripe’s subscription infrastructure supports trial periods and introductory pricing that can apply automatically when a customer redeems the code during signup.

How do discount codes affect pricing and margins?

There’s more to discount codes than their surface-level financial impact. Here are a few layers worth accounting for.

Gross margin compression

This is the direct impact. If you sell a product for $100 with a 40% gross margin and offer a 20% discount, your revenue drops to $80 while your cost stays at $60. Your gross margin on that transaction falls from 40% to 25%. At scale, that margin loss accumulates fast.

Incremental revenue vs. cannibalization

You need to determine whether the code will generate revenue you wouldn’t have gotten otherwise or whether it simply gives a discount to customers who would’ve bought anyway. Cannibalization is harder to identify because there’s no revenue offset. You’ve just lowered your average order value on existing demand. Attribution can be difficult here, especially when codes are distributed broadly through affiliate channels or public coupon sites.

LTV effects

Discount codes can lower LTV in two ways. First, customers acquired through deep discounts tend to make fewer repeat purchases and be more sensitive to price. Second, if a customer redeems a code on their first purchase, you’ve established a price expectation that’s hard to change.

But discount codes can potentially raise LTV as well: a well-timed win-back code sent to a lapsed customer can reactivate them at a lower cost than acquiring a new one. The margin you sacrifice on that transaction might be worth it if the customer goes on to make several full-price purchases.

Accounting considerations

Discounts reduce gross revenue, and how they’re recorded matters. The standard accounting treatment is to record discounts as contra revenue entries against gross revenue and reduce the top line rather than mark discounts as an expense. That affects how you report revenue and calculate metrics such as average order value. If you use accrual accounting and issue codes that customers might redeem across periods, you’ll also need to think about how to handle the liability.

What are the risks of running discount code campaigns?

Discount codes also introduce risks to operations and finances. These issues aren’t always obvious at the planning stage so keep the following in mind.

Code leakage

A code intended for a specific segment can end up on a coupon aggregator site within hours of distribution. Once it’s public, you’ve effectively run a sitewide sale you didn’t plan for. Single-use codes help, but they add friction for the customer and are harder to distribute at scale.

Stacking and exploitation

If your platform allows multiple codes on a single order or your discount logic interacts with other promotions, you can end up with effective discounts that are larger than intended.

Training customers to wait

Running discount campaigns frequently teaches your customer base to delay purchases until the next code arrives. Over time, this erodes full-price revenue in ways that are hard to reverse.

Fraud and abuse

Some customers will create multiple accounts to redeem single-use codes repeatedly. Others will attempt to apply codes after a purchase through customer service pressure. Per-customer limits, rather than per-account limits, help with the former; clear terms and customer service policies help with the latter.

Complexity at scale

Managing a large library of active codes gets unwieldy without a structured approach. Expired codes that weren’t properly deactivated, conflicting promotions, and codes that apply to the wrong products can all cause substantial problems for your operations.

Are discount codes worth it for your business?

Discount codes work well in specific circumstances and poorly in others. They tend to perform best in these scenarios:

  • New customer acquisition: When the LTV is high enough, this can justify the up-front margin sacrifice.

  • Lapsed customer reactivation: A well-timed win-back code can reactivate a dormant customer at lower cost than acquiring a new one.

  • Inventory clearance: When the alternative is a write-down, a discount code moves product and recovers at least some margin.

  • Partner and affiliate arrangements: The code tracks referrals so the discount is effectively a commission paid at the point of sale.

Before you run a code-based campaign, determine how much of a discount your margins can absorb, what redemption volume you’re planning for, and how you’ll measure incremental revenue. Creating a discount code is easy, but the real challenge lies in designing a campaign so that the revenue it generates exceeds the cost of the margin loss.

Stripe provides the infrastructure to run discount codes on one-time purchases and subscriptions, with controls to limit exposure such as usage caps, expiration dates, customer restrictions, and combination rules. A small promotion to a targeted email list might need only a simple code with an expiration date. A large-scale acquisition campaign probably needs more guardrails.

How Stripe Connect can help

Stripe Connect orchestrates money movement across multiple parties for software platforms and marketplaces. It offers quick onboarding, embedded components, global payouts, and more.

Connect can help you:

  • Launch in weeks: Use Stripe-hosted or embedded functionality to go live faster, and avoid the up-front costs and development time usually required for payment facilitation.

  • Manage payments at scale: Use tooling and services from Stripe so you don’t have to dedicate extra resources to margin reporting, tax forms, risk, global payment methods, or onboarding compliance.

  • Grow globally: Help your users reach more customers worldwide with local payment methods and the ability to easily calculate sales tax, value-added tax (VAT), and goods and services tax (GST).

  • Build new lines of revenue: Optimize payment revenue by collecting fees on each transaction. Monetize Stripe’s capabilities by enabling in-person payments, instant payouts, sales tax collection, financing, expense cards, and more on your platform.

Learn more about Stripe Connect, or get started today.

The content in this article is for general information and education purposes only and should not be construed as legal or tax advice. Stripe does not warrant or guarantee the accurateness, completeness, adequacy, or currency of the information in the article. You should seek the advice of a competent attorney or accountant licensed to practice in your jurisdiction for advice on your particular situation.

More articles

  • Something went wrong. Please try again or contact support.

Ready to get started?

Create an account and start accepting payments—no contracts or banking details required. Or, contact us to design a custom package for your business.
Connect

Connect

Go live in weeks instead of quarters, build a profitable payment business, and scale with ease.

Connect docs

Learn how to route payments between multiple parties.