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, FounderUpdated
On this page
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
| Moment | Stripe event | Money moved on a $49 plan | What the commission system does |
|---|---|---|---|
| Trial starts | customer.subscription.created, status trialing | $0 | Nothing is owed |
| 3 days before the trial ends | customer.subscription.trial_will_end | $0 | Confirm the partner is saved on the subscription |
| First payment | invoice.paid | $49.00 | Create the first commission and save the partner against the subscription |
| Renewal paid | invoice.paid on the same subscription | $49.00 | Look up the partner and commission the invoice if the terms still apply |
| Renewal fails | invoice.payment_failed | $0 | Nothing is owed until a retry succeeds |
| Refund or dispute | charge.refunded, charge.dispute.created | -$49.00 | Reverse the commission on that one charge |
| Customer cancels | customer.subscription.deleted | $0 | Stop new commissions and keep paid ones |
| Customer returns | A new subscription with a new ID | $49.00 | Apply 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.
| Invoice | What happened | Amount kept | Commission at 30% |
|---|---|---|---|
| 1 | First payment after the trial | $49.00 | $14.70 |
| 2 | Renewal paid on time | $49.00 | $14.70 |
| 3 | Card declined, retry succeeded 3 days later | $49.00 | $14.70 |
| 4 | Paid, then refunded in full | $0.00 | $0.00 (reversed) |
| 5 | Renewal paid on time | $49.00 | $14.70 |
| Total | 5 invoices, 4 kept | $196.00 | $58.80 |
Where the partner is stored so a renewal can find it
| Storage | How the partner gets there | Reaches renewals |
|---|---|---|
| Subscription metadata | subscription_data.metadata on the Checkout Session | Yes, copied onto each invoice when Stripe creates it |
| Customer metadata | Your code or the affiliate tool writes a key such as referral, which Rewardful reads | Yes, for every subscription the customer holds |
| The tool's subscription record | The tool saves the first order and click against the subscription ID | Yes, copied to each later charge |
| Promotion code | The customer enters the partner's code at checkout | Only 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.
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 duration | Invoices that show the code | Most a code-only partner earns, $49 plan at 30% |
|---|---|---|
once | The first charge | $14.70 |
repeating, duration_in_months of 3 | The first 3 months | $44.10 |
forever | Every 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.
| Term | 3% churn | 5% churn | 8% 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.
| Plan | Commission per invoice at 30% | Rule: first 12 payments | Rule: 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.
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.
| Day | What happens | Age of the click |
|---|---|---|
| 0 | Visitor clicks the partner link | 0 days |
| 20 | Visitor signs up and starts a 14-day trial | 20 days |
| 30 | A 30-day window closes | 30 days |
| 34 | Trial ends and the first $49.00 charge succeeds | 34 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
| Case | What TrackRev does |
|---|---|
| First paid charge | Saved as an order tagged with the Stripe subscription ID and credited to a click inside the 30-day default window |
| Renewal | Copies the first order's link and channel, rescaled to the new charge, with no cookie lookup |
| Later click on another partner's link | Changes nothing, because renewals copy the first order's credit |
| First charge with no credit | Its renewals have no credit to copy |
| Returning customer | A new first charge, credited to any tracked click inside the window |
| First-sale-only program | $0 on every renewal |
| Recurring program | One commission row per paid charge, so a refund reverses only its own charge |
| Refund of any size | That charge's commission reverses in full |
| Hold period | 0 to 180 days per program, 0 by default |
| Paddle Billing, Polar, Lemon Squeezy, Creem and Dodo Payments | The 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.
Frequently asked questions
- Only if the program's terms say so. Common structures pay invoice 1 only, a fixed window of months, or the customer's whole lifetime. TrackRev programs pay the first sale or every paid renewal.
- For subscriptions charged automatically, Stripe sends invoice.upcoming a few days before the renewal, with the number of days set in the Stripe Dashboard. Subscriptions that Stripe emails as invoices do not get it.
- At 5% monthly churn a 12-month term pays about 46% of a lifetime term, so the choice is how much of a $158.87 gap per referral you keep as margin. Whatever you pick, write it in months.
- Pick the subscription when each one is a separate deal, and the customer when a returning buyer should stay with the first partner. Stripe copies neither automatically.
- Longer than your longest click-to-signup gap plus the trial. A visitor who signs up 31 days after the click and starts a 14-day trial needs a window of at least 45 days.
- No. Free covers 50 links and 1,000 tracked events a month, with the affiliate program locked and revenue figures hidden. Paid plans begin at Indie, $29 a month.

Written by
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