Affiliate tracking for subscriptions: paying partners on every renewal

How to credit a partner on every renewal: where to store the referral, which of 4 commission terms to pick, and how a 14-day trial changes attribution.

Muzahid Maruf — Founder of TrackRev.io

Muzahid MarufUpdated

Affiliate programs · 8 min read
On this page
  1. 01How affiliate tracking for subscriptions follows each billing event
  2. 02Where the partner is stored so a renewal can find it
  3. 03Choosing a commission model
  4. 04Trials, failed payments and returning customers
  5. 05How TrackRev tracks renewals

Explore with AI

Opens this article inside the chosen assistant with a ready-made prompt.

Affiliate tracking for subscriptions means crediting a partner on the first paid invoice and paying that partner on later invoices for as long as your terms say.

A $49 monthly plan produces 12 invoices a year, so a tool that credits only invoice 1 pays a 30% partner $14.70 of a possible $176.40.

Stripe Billing creates each renewal on a schedule with no browser involved, so the partner has to be saved where a renewal can read it.

Refunds and plan changes have their own guide to Stripe affiliate commissions on refunds, upgrades and downgrades.

Key takeaways

  • Checkout puts data on the subscription only through subscription_data.metadata, and each Stripe object holds 50 key-value pairs.
  • At 5% monthly churn, 30% of a $49 plan pays $14.70 on a first-payment term, $135.13 over 12 months and $294.00 for life.
  • Count the term in months: a $490 annual plan pays $147.00 once under a 12-month rule, and $147.00 every year under a payment count.
  • A 14-day trial after a 20-day click-to-signup gap puts the first charge on day 34, outside a 30-day attribution window.
  • TrackRev copies the first order's credit onto each renewal, writes one commission per paid charge, reverses each on its own and holds payouts for 0 to 180 days per program.

How affiliate tracking for subscriptions follows each billing event

MomentStripe eventMoney moved on a $49 planWhat the commission system does
Trial startscustomer.subscription.created, status trialing$0Nothing is owed
3 days before the trial endscustomer.subscription.trial_will_end$0Confirm the partner is saved on the subscription
First paymentinvoice.paid$49.00Create the first commission and save the partner against the subscription
Renewal paidinvoice.paid on the same subscription$49.00Look up the partner and commission the invoice if the terms still apply
Renewal failsinvoice.payment_failed$0Nothing is owed until a retry succeeds
Refund or disputecharge.refunded, charge.dispute.created-$49.00Reverse the commission on that one charge
Customer cancelscustomer.subscription.deleted$0Stop new commissions and keep paid ones
Customer returnsA new subscription with a new ID$49.00Apply your resubscription rule

Event names and timing from Stripe's subscription webhook guide.

Stripe's guide uses invoice.paid to extend access and says to confirm the subscription is active first, since a paid invoice does not always move it there.

Live-mode webhook retries run for up to 3 days, and TrackRev's hourly charge read covers anything a delivery missed. FirstPromoter's Stripe documentation lists 7 tracked events, among them invoice.payment_succeeded for sales and charge.dispute.created for refunds.

Finding the subscription behind a refund depends on the API version. Before 2025-03-31.basil the Charge object has an invoice field, and from that version on you go from the PaymentIntent to its invoice payments. TrackRev requests 2025-02-24.acacia.

A referred customer across five invoices

A $49 monthly plan, a 30% commission, a program that pays on every renewal and a 14-day trial before invoice 1.

Each invoice is its own commission row, so the refund on invoice 4 takes back $14.70 and leaves four commissions in place.

InvoiceWhat happenedAmount keptCommission at 30%
1First payment after the trial$49.00$14.70
2Renewal paid on time$49.00$14.70
3Card declined, retry succeeded 3 days later$49.00$14.70
4Paid, then refunded in full$0.00$0.00 (reversed)
5Renewal paid on time$49.00$14.70
Total5 invoices, 4 kept$196.00$58.80

Where the partner is stored so a renewal can find it

StorageHow the partner gets thereReaches renewals
Subscription metadatasubscription_data.metadata on the Checkout SessionYes, copied onto each invoice when Stripe creates it
Customer metadataYour code or the affiliate tool writes a key such as referral, which Rewardful readsYes, for every subscription the customer holds
The tool's subscription recordThe tool saves the first order and click against the subscription IDYes, copied to each later charge
Promotion codeThe customer enters the partner's code at checkoutOnly while the coupon stays on the invoice

Rewardful's Stripe integration article describes the customer-metadata approach. Customer-level credit follows that person into a second product, so state your rule.

Subscription metadata

Stripe's metadata guide says metadata does not copy to related objects on its own, with a few exceptions such as a snapshot from subscription to each new invoice.

Checkout reaches the subscription through subscription_data.metadata, while the Session's own metadata stays on the Session. Each object holds 50 key-value pairs, with 40-character keys and 500-character values.

Node: save the partner on the subscription at checkout
const session = await stripe.checkout.sessions.create({  mode: "subscription",  line_items: [{ price: "price_monthly_49", quantity: 1 }],  client_reference_id: visitorId, // your first-party visitor ID  subscription_data: {    trial_period_days: 14,    metadata: { partner_id: partnerId }, // lands on the subscription  },  success_url: "https://example.com/welcome",});

Set it before the customer pays: later changes do not rewrite invoices Stripe has already created, so a partner added after invoice 1 is missing from invoice 1. Stripe metadata attribution setup covers the other objects that carry a source.

Promotion codes

A code credits partners with no link to share, such as a podcast host. A tool that reads the code from each invoice, as TrackRev does, sees the partner only while Stripe's coupon duration keeps it there.

The coupon code tracking guide covers matching.

Coupon durationInvoices that show the codeMost a code-only partner earns, $49 plan at 30%
onceThe first charge$14.70
repeating, duration_in_months of 3The first 3 months$44.10
foreverEvery charge$14.70 a month

Churn ignored. A partner who also has a tracked link click is covered by the stored credit.

Choosing a commission model

Rewardful's campaign settings article (dated March 21, 2026) sets a maximum number of commissioned payments and a maximum period in months, and stops at the first limit reached: with 3 payments and 12 months, a fourth payment inside those 12 months earns nothing.

FirstPromoter's recurring commissions article (dated July 16, 2026) offers customer lifetime, a time span in months or a count of charges, where 1 pays the first charge only, plus a second rate after the first charge such as 20% then 30%.

On a $49 monthly plan at 30%, a referred customer earns a partner anywhere from $14.70 to $490.00, depending on the term and the monthly churn rate.

Term3% churn5% churn8% churn
First payment only$14.70$14.70$14.70
First 3 payments$42.79$41.93$40.67
First 12 months$150.02$135.13$116.19
Lifetime$490.00$294.00$183.75

Payout is $14.70 x (1 - (1 - c)^n) / c for n payments at monthly churn c, and $14.70 / c for lifetime. The churn rates are assumptions, so substitute your own.

At 5% churn a lifetime term pays 2.2 times what 12 months does, a $158.87 gap per referral that arrives after the partner's work is done.

The multiple is 3.3 at 3% churn and 1.6 at 8%, so the better your retention, the more a lifetime promise costs.

I lean toward 12 months for a new program: it is easy to explain and extend, while taking back a lifetime promise is hard.

Count months, not invoices

An annual plan priced at 10 times the monthly one makes a payment count and a month count disagree.

PlanCommission per invoice at 30%Rule: first 12 paymentsRule: first 12 months
$49 monthly$14.70$176.40 over 1 year$176.40
$490 annual$147.00$1,764.00 over 12 years$147.00

Before churn and refunds.

An annual renewal lands exactly 12 months after invoice 1, so say in writing whether that renewal counts.

Trials, failed payments and returning customers

Free trials and the attribution window

Stripe Checkout accepts trial_period_days, and the subscription stays trialing until the first payment moves it to active. FirstPromoter's Stripe documentation says it skips invoices with an amount_paid of zero, so commissions start at the first real payment.

TrackRev's attribution window is a workspace setting, 30 days by default, counted back from the first paid charge, so it has to cover your click-to-signup gap plus the trial.

DayWhat happensAge of the click
0Visitor clicks the partner link0 days
20Visitor signs up and starts a 14-day trial20 days
30A 30-day window closes30 days
34Trial ends and the first $49.00 charge succeeds34 days, 4 past the window

Failed payments

A declined renewal leaves the subscription past_due while Stripe retries, 8 times within 2 weeks under the Smart Retries default that Stripe recommends, set in the Stripe Dashboard.

If recovery fails, the subscription becomes canceled, unpaid, past_due or paused, per your settings. The first invoice has less room: after 23 hours unpaid, incomplete becomes incomplete_expired and the customer is never billed.

The commission waits for a paid invoice, so a retry that succeeds creates it and an invoice that never pays creates none.

Cancel and resubscribe

Stripe treats canceled as terminal, so a customer who cancels in the Stripe Customer Portal and returns gets a new subscription ID and nothing saved on the old one comes along.

Set a rule up front, such as 90 days of credit for the original partner. TrackRev treats the return as a new first charge.

How TrackRev tracks renewals

CaseWhat TrackRev does
First paid chargeSaved as an order tagged with the Stripe subscription ID and credited to a click inside the 30-day default window
RenewalCopies the first order's link and channel, rescaled to the new charge, with no cookie lookup
Later click on another partner's linkChanges nothing, because renewals copy the first order's credit
First charge with no creditIts renewals have no credit to copy
Returning customerA new first charge, credited to any tracked click inside the window
First-sale-only program$0 on every renewal
Recurring programOne commission row per paid charge, so a refund reverses only its own charge
Refund of any sizeThat charge's commission reverses in full
Hold period0 to 180 days per program, 0 by default
Paddle Billing, Polar, Lemon Squeezy, Creem and Dodo PaymentsThe same renewal step, keyed on the provider's subscription ID

Set the hold past your refund window; the clawback guide covers refunds that arrive after a payout. If you need proportional reversal on partial refunds, pick Rewardful, which recalculates from the refunded amount.

Test any payment cap with a Stripe test clock before you promise it. The affiliate tracking guide covers who owned the first sale.

TrackRev is SaaS affiliate software for indie hackers and small teams, so renewal tracking is part of the affiliate program on both paid plans, with no limit on the revenue tracked.

The affiliate program needs a paid plan: Indie is $29 a month and Growth is $299 a year, with no cap on the commission tracked, and Free covers link tracking only.

See the affiliate program page, the pricing page and how to pay affiliates.

Found this useful? Share it.

PostLinkedIn

Frequently asked questions

Muzahid Maruf — Founder of TrackRev.io

Written by

Muzahid Maruf

Founder, TrackRev.io & Contant.io

Muzahid Maruf founded TrackRev.io, SaaS affiliate software with no limit on tracked revenue, and Contant.io. He writes about affiliate programs.

Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth

Stop guessing where your revenue comes from.

Set up TrackRev in about five minutes. The free plan covers 1,000 events a month, no card needed.

Start free