Refgrow
12 min read

Coupon Code Tracking for Affiliate Programs

How automatic coupon-based affiliate tracking works, why it outperforms link-only tracking, and how to set it up with Refgrow in minutes. Cookie-free attribution that works across devices, ad blockers, and offline channels.

What Is Coupon Code Tracking?

Coupon code tracking is an affiliate attribution method where each affiliate receives a unique discount code. When a customer uses that code during checkout, the purchase is automatically attributed to the affiliate who owns the code. The affiliate earns their commission, and the customer gets a discount.

Unlike referral link tracking (which relies on browser cookies), coupon code tracking ties the attribution to the payment itself. The coupon code is stored in your payment processor's data (Stripe, Paddle, or LemonSqueezy), making it immune to cookie deletion, ad blockers, incognito mode, and device switches.

This makes coupon code tracking one of the most reliable affiliate attribution methods available. It works alongside link-based tracking as an additional attribution layer, ensuring that affiliates get credited for their referrals regardless of how the customer arrives at your checkout page.

How Coupon Code Tracking Works in Refgrow

Refgrow automates the entire coupon tracking lifecycle. Here is the step-by-step flow from affiliate signup to commission payout.

Step 1: Affiliate joins your program

When someone becomes an affiliate (either through the embedded widget in your product or via direct invitation), Refgrow automatically creates a unique Stripe coupon for them. The coupon code is based on their name or a custom identifier — for example, SARAH20 or PARTNER-TECHBLOG.

Step 2: Affiliate shares their coupon code

The affiliate sees their coupon code in their dashboard alongside their referral link. They can share it however they want: in blog posts, YouTube video descriptions, podcast mentions, social media, email newsletters, or word of mouth. The coupon code appears prominently in the affiliate's dashboard widget.

Step 3: Customer applies the coupon at checkout

When a potential customer enters the affiliate's coupon code during your Stripe Checkout (or Paddle/LemonSqueezy checkout), the discount is applied to their purchase. Stripe records the coupon on the subscription or payment object.

Step 4: Webhook triggers commission calculation

When Stripe sends the invoice.payment_succeeded or checkout.session.completed webhook, Refgrow inspects the payment data for attached coupons. It looks up the coupon code in its database to find the owning affiliate, then calculates the commission based on the full payment amount (before the discount).

Step 5: Commission is recorded and tracked

The conversion appears in both the affiliate's dashboard and your admin dashboard. For subscription products, every subsequent payment with that coupon automatically generates a new commission entry. The affiliate can see their earnings growing in real time through the embedded widget.

Example Flow

1Affiliate Sarah joins your program and gets coupon code SARAH20 (20% off first month)
2Sarah mentions the code in her YouTube review: "Use code SARAH20 for 20% off"
3Viewer goes directly to your website (no referral link), enters SARAH20 at checkout
4Customer pays $100/mo (gets $80 first month). Stripe records the coupon on the subscription.
5Refgrow detects SARAH20, credits Sarah with 20% commission = $20/month recurring

Link-based tracking (using referral URLs with cookies) is the traditional affiliate attribution method. It works well in many cases, but has significant limitations that coupon tracking solves.

ScenarioLink TrackingCoupon Tracking
Customer uses ad blockerCookie may be blockedWorks perfectly
Customer switches devicesAttribution lostWorks perfectly
Customer clears cookiesAttribution lostWorks perfectly
Incognito / private browsingCookie lost on closeWorks perfectly
Podcast / video mentionCannot share a link verballyEasy to share verbally
Print / offline promotionNot practicalWorks perfectly
Customer types URL directlyNo attributionWorks with code entry
Customer gets a discountNo inherent discountBuilt-in discount incentive

The dual benefit: attribution + conversion

Coupon codes are unique because they serve two purposes simultaneously. First, they provide affiliate attribution (which affiliate referred this customer). Second, they provide a conversion incentive (the customer gets a discount). This dual benefit is why programs using coupon tracking alongside link tracking see 15-30% more total attributed conversions than programs using link tracking alone.

Why you should use both

Coupon tracking and link tracking are not mutually exclusive — they are complementary. Refgrow uses both methods simultaneously as layers in an attribution priority chain. If a customer clicks a referral link AND uses a coupon code from a different affiliate, the coupon takes priority (it represents the most recent and deliberate attribution signal). If a customer clicks a referral link but does not use a coupon, the link-based attribution applies. This layered approach maximizes tracking accuracy.

Get automatic coupon tracking with Refgrow

Refgrow creates unique Stripe coupons for each affiliate automatically. No manual coupon management, no spreadsheets, no missed attributions.

Start Your Free Trial

Setting Up Coupon Code Tracking

Refgrow handles coupon creation and tracking automatically when connected to your payment processor. Here is how to enable and configure it.

Step 1: Connect your payment processor

In your Refgrow project settings, connect your Stripe, Paddle, or LemonSqueezy account. Refgrow needs API access to create coupons and listen for payment webhooks.

Step 2: Configure coupon settings

In your project's affiliate settings, configure the default coupon parameters:

  • Discount type: Percentage off or fixed amount off
  • Discount value: e.g., 20% off or $10 off
  • Duration: First payment only, multiple months, or forever
  • Coupon naming pattern: Auto-generated from affiliate name, custom prefix, or fully custom codes

Step 3: Enable the coupon field in Stripe Checkout

Make sure your Stripe Checkout session includes allow_promotion_codes: true so customers can enter coupon codes during checkout. If you use Stripe's hosted pricing page, this option is available in the Stripe Dashboard under Payment Links settings.

JavaScript — Stripe Checkout Session
const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [{ price: 'price_xxx', quantity: 1 }],
  allow_promotion_codes: true,  // Enable coupon field
  success_url: 'https://yourapp.com/success',
  cancel_url: 'https://yourapp.com/pricing',
});

Step 4: Affiliates automatically receive coupons

When a new affiliate joins your program (through the embedded widget or via invitation), Refgrow automatically creates a Stripe promotion code for them. The coupon appears in their affiliate dashboard alongside their referral link. No manual intervention needed.

Use Cases for Coupon Code Tracking

Content creators and influencers

YouTubers, podcasters, and bloggers naturally share coupon codes as part of their content. "Use code TECHREVIEW for 25% off your first month" is a standard call-to-action that viewers are familiar with. Coupon tracking lets you attribute these offline-to-online conversions accurately.

Partner and reseller programs

Agencies and consultants who recommend your product to clients can share a branded coupon code rather than a tracking link. The coupon feels more professional than a referral link and provides a tangible benefit to the client.

Conference and event promotions

Speakers, sponsors, and exhibitors at industry events can share coupon codes on slides, business cards, and booth materials. Attendees can type the code from memory when they get back to their desks — no need to scan a QR code or type a long URL.

Customer referral programs

Your existing customers can share their coupon code with colleagues in casual conversation: "We use ProductX for our analytics. If you sign up, use my code ALEX15 for a discount." This word-of-mouth referral is captured through the coupon even though no referral link was clicked.

Email newsletter sponsorships

When sponsoring newsletters, including a unique coupon code in the ad copy lets you track exactly how many conversions each newsletter drives. This makes newsletter sponsorship ROI measurable and accountable.

Automatic vs Manual Coupon Tracking

Some companies try to track coupon-based referrals manually — creating coupons in Stripe by hand, checking payments against a spreadsheet, and calculating commissions monthly. Here is how that compares to automated tracking.

AspectManual TrackingRefgrow (Automated)
Coupon creationManual in Stripe DashboardAutomatic per affiliate
Commission calculationSpreadsheet formulasReal-time, automatic
Recurring commission trackingMonthly export + matchEvery payment auto-tracked
Affiliate dashboardNone (or custom-built)Embedded widget included
Refund handlingManual adjustmentAutomatic commission reversal
Time per month (10 affiliates)2-4 hours0 hours
Error rate5-15% (human error)~0% (automated)

Manual tracking becomes unmanageable quickly. At 10 affiliates with recurring commissions, you are spending several hours per month on spreadsheet work. At 50+ affiliates, it becomes a part-time job. Automated tracking eliminates this entirely while being more accurate.

Frequently Asked Questions

Does coupon tracking work with Stripe promotion codes?

Yes. Refgrow creates Stripe promotion codes (the customer-facing codes like SARAH20) that are linked to underlying Stripe coupons. When a customer applies a promotion code during checkout, Stripe attaches the coupon to the subscription. Refgrow reads this coupon from the webhook payload and attributes the conversion to the correct affiliate.

Can affiliates have custom coupon codes?

Yes. By default, Refgrow auto-generates coupon codes based on the affiliate's name, but you can customize any affiliate's coupon code through the dashboard. This is useful when an affiliate wants a branded code that matches their content (e.g., TECHBLOG25 instead of an auto-generated code).

Does the commission calculate on the discounted or full price?

By default, Refgrow calculates commissions on the actual amount paid (after the coupon discount). However, you can configure your project to calculate commissions on the full price before discount. This choice depends on your program economics — calculating on the full price is more generous to affiliates but costs you more.

What happens if a customer uses a coupon but also clicked a referral link from a different affiliate?

Refgrow's attribution priority chain resolves this. Coupon-based attribution takes priority over link-based attribution because it represents a more deliberate and recent signal. The affiliate whose coupon was used gets the commission. This prevents double-attribution while ensuring the most accurate tracking.

Can I use coupon tracking without giving a discount?

Technically, you could create 0% discount coupons that serve purely as tracking identifiers. However, this defeats one of the key benefits of coupon tracking: the conversion incentive for the customer. Most programs see better results with a meaningful discount (10-25% off the first payment) that motivates customers to complete checkout.

Start tracking affiliate coupons automatically

Refgrow creates unique coupons for each affiliate, tracks every payment, and calculates commissions in real time. No spreadsheets, no manual matching, no missed attributions.

Related Resources

Start Free Trial
Coupon Code Tracking for Affiliate Programs: How It Works | Refgrow