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.
In the renewal step we built for TrackRev, each paid charge earns its own commission row. 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 does affiliate tracking for subscriptions follow 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.
A billing event is a Stripe notification that a subscription changed state. 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 in our hourly charge read, anything a delivery missed is covered. 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. Our own integration requests 2025-02-24.acacia.
What does one referred customer look like across five invoices?
Five invoices are the standard test of a recurring program. Take 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. The four kept invoices earn $58.80 in total.
The declined card on invoice 3 changes nothing, because only a paid invoice earns commission and the card cleared on a retry. Kept revenue is $196.00 across 4 invoices, and 30% of $196.00 is $58.80.
Automated retries give a declined card time to clear, so the ledger records only money that arrived.
| 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 is the partner stored so a renewal can find it?
Storage is the place where the partner ID lives so a later renewal can read it. Four options exist: subscription metadata, customer metadata, the affiliate tool's own subscription record, and a promotion code.
The first three reach every renewal, while a promotion code reaches renewals only as long as the coupon stays on the invoice. Subscription metadata suits separate deals, and customer metadata keeps a repeat buyer with the original partner.
State the chosen rule in the partner terms.
| 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.
How does subscription metadata carry the partner?
Subscription metadata is a set of key-value pairs saved on the Stripe subscription object.
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.
Can promotion codes carry the partner through renewals?
A promotion code is a customer-facing code attached to a Stripe coupon. 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.
A coupon duration of once pays a code-only partner on 1 invoice, a repeating duration pays on a set number of months, and forever pays on every charge.
For example, a repeating coupon of 3 months pays $44.10 on a $49 plan at 30%. 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.
Which commission model should you choose?
A commission model is the rule that sets how many invoices pay the partner.
Rewardful's campaign settings article from 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.
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.
Sources: help.rewardful.com/en · help.firstpromoter.com/en
How much more does a lifetime term cost than 12 months?
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.
A 12-month term suits a new program: the term is easy to explain and extend, while taking back a lifetime promise is hard. Retention drives the gap.
A product keeping 97% of customers each month stretches a lifetime promise across nearly 3 years, and the partner collects the long tail with no further work. Budget that worst case before promising it.
| Plan price | Commission per invoice at 30% | 12 months at 5% churn | Lifetime at 5% churn |
|---|---|---|---|
| $19 | $5.70 | $52.40 | $114.00 |
| $49 | $14.70 | $135.13 | $294.00 |
| $99 | $29.70 | $273.02 | $594.00 |
| $199 | $59.70 | $548.81 | $1,194.00 |
Same formula as the churn table above. The churn rate is an assumption, so substitute your own.
Why count months, not invoices?
A payment count is a limit on the number of commissioned invoices, while a month count is a limit on elapsed time. An annual plan priced at 10 times the monthly one makes the two rules disagree.
A cap of 12 payments on the $490 annual plan would pay the partner for 12 years, which is $1,764.00, while a cap of 12 months pays one invoice of $147.00.
A $49 monthly plan gives $176.40 under both rules, so the rules diverge only on annual plans. An annual renewal lands exactly 12 months after invoice 1, so say in writing whether the renewal counts.
Model both rules in a spreadsheet before launch: multiply the commission per invoice by the cap, then compare the cumulative total with gross margin. A cap that looks generous in months can be ruinous in invoices.
| 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.
How do free trials change the attribution window?
An attribution window is the number of days between a click and the first paid charge in which the click still earns credit. 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 |
Sources: docs.firstpromoter.com/integrations
| Click-to-signup gap | Trial | First charge | Against a 30-day window |
|---|---|---|---|
| 0 days | 14 days | Day 14 | Inside, 16 days to spare |
| 10 days | 14 days | Day 24 | Inside, 6 days to spare |
| 20 days | 14 days | Day 34 | Outside by 4 days |
| 31 days | 14 days | Day 45 | Outside by 15 days |
A window of at least 45 days covers the last row.
What happens to commission when a payment fails?
A failed payment is a renewal charge the card issuer declines. 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. For example, if invoice 3 clears on a retry, the full $14.70 is still owed.
What happens when a customer cancels and resubscribes?
A resubscription is a return to paid service under a new subscription.
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.
Publish the rule in the program FAQ, because partners notice orphaned customers quickly, and a grace period balances loyalty to the original partner against the chance that a win-back campaign did the real work.
TrackRev treats the return as a new first charge.
How does TrackRev track 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 (Lemon Squeezy renewals are not read yet) |
TrackRev is SaaS affiliate software for indie hackers and small SaaS teams, and renewal tracking is part of the affiliate program on both paid plans.
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. In our programs, no limit applies to 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.
- The subscription suits one deal per plan, while the customer suits a long relationship where a repeat purchase should credit the original partner. Stripe does the copying for neither.
- 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. The Free plan allows 50 links and 1,000 tracked events a month, with the affiliate program locked and revenue figures hidden. Indie, at $29 a month, is the entry point.

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
Run your affiliate program without a revenue cap.
Affiliate software for indie hackers and small SaaS teams: $29 a month flat, 0% fees, link tracking and revenue attribution built in. Free to start, no card.