How to Set Up a Referral Program for Your SaaS
How to set up a referral program for SaaS in 7 steps: budget the reward, pick cash or credit, write fraud rules, track referrals and review at day 60.
Muzahid Maruf, FounderUpdated
Explore with AI
Opens this article inside the chosen assistant with a ready-made prompt.
How to set up a referral program for a subscription product comes down to 7 steps: (1) set a reward budget, (2) design the reward, (3) write the eligibility and fraud rules, (4) wire tracking to your billing system, (5) place the invitation, (6) test a full purchase, and (7) review results at day 60.
A referral program is a system that pays your own customers for introducing new ones. Outside promoters belong in an affiliate program, covered in how to create an affiliate program.
The worked numbers use a $49 monthly plan at an 80% gross margin, and the tracking steps use TrackRev with Stripe, following the Stripe and Federal Trade Commission documentation cited in each step.
Key takeaways
- Cap the reward at about half of your paid acquisition cost. At $240 that is $120, which a $49 plan at an 80% gross margin earns back in 3.1 months.
- Reward paid charges. A commission written from a paid invoice (20% of $49 is $9.80) can't be farmed with free accounts, and a refund reverses it.
- Limit the friend's discount to first-time customers in Stripe, match the hold period to a 30-day refund window, and review results at day 60.
What is a referred customer worth?
Researchers at Goethe University Frankfurt and the Wharton School compared customers a German bank won through its referral program with a random sample from other channels, across almost 10,000 accounts and 33 months.
Referred customers had a 25% higher contribution margin, churned 18% more slowly and had a 16% higher 6-year lifetime value.
In the authors' summary, the bank paid €25 per referral against a €40 lifetime-value gap, a return of roughly 60% ((40 minus 25) divided by 25). It is one company in one industry, so step 7 measures your own numbers.
Treat the 25% margin, 18% churn and 16% value gaps as a reason to test, not a forecast. A referral program is worth testing when referred customers cost less than the paid channel, which step 1 checks with arithmetic.
Step 1: How much should the reward cost?
The reward budget is the cap on what one referred customer may cost, set at 50% of paid CAC.
Pick one number to move, referred customers who pay each month, and cap the reward at half of your paid customer acquisition cost (CAC), which keeps referrals your cheapest channel.
A $49 monthly plan at an 80% gross margin earns $39.20 of gross profit a month.
| Blended paid CAC | Reward ceiling at half | Months of gross profit to recover it |
|---|---|---|
| $120 | $60 | 1.5 |
| $240 | $120 | 3.1 |
| $480 | $240 | 6.1 |
| $720 | $360 | 9.2 |
Worked example: $49 plan, 80% gross margin, $39.20 of gross profit a month.
To find your paid CAC, divide last quarter's ad and sales spend by the new paying customers it produced: $24,000 and 100 customers gives $240.
A ceiling that takes more than about 6 months of gross profit to recover bets on the customer staying that long, so check your churn first.
At the $120 ceiling, 100 referred customers cost at most $12,000 in rewards, against $24,000 of paid spend for the same 100 customers at $240 each.
Step 2: What should referrers and friends get?
A one-sided program is a design that rewards only the referrer. A two-sided program also gives the friend a discount on the first purchase, free months or extra trial days, which hands the referrer an offer to pass along.
| Design | Referrer earns | Friend gets | Cost per referred customer |
|---|---|---|---|
| 20% recurring for 12 months, cash | $117.60 over 12 months | Nothing | $117.60, paid as the friend keeps paying |
| $50 one-time, cash | $50 | Nothing | $50, whether or not the friend stays |
| Free month for the referrer, 20% off the friend's first purchase | $49 credit | $9.80 off | $58.80 of forgone revenue |
| $25 cash for the referrer, 14 extra trial days for the friend | $25 | 14 days | $25 plus 14 days of serving an unpaid account |
| 3 free months for each side | $147 credit | $147 off | $294 of forgone revenue, well over a $120 ceiling |
Reward designs on a $49 plan. The first row is 20% of $588, the first 12 months of revenue.
Stripe's coupon documentation lets a subscription hold up to 20 discounts, so a friend's code can sit beside sale pricing.
A recurring percentage stops costing you when the customer leaves: a friend who cancels after 3 months costs $29.40 at 20% (3 times $9.80), while the flat $50 is already spent.
A full 12 months of the 20% reward totals $117.60, which is 49% of a $240 CAC.
Cash suits referrers who are businesses or creators, and it adds payout work: a $100 default minimum, a hold period and W-9 or W-8 forms (see how to pay affiliates).
Credit suits product-led tools and needs no payout run, but a month credited to a paying customer gives up the full $49, while usage credits cost only what they cost to serve.
We built TrackRev to deliver credit into your own backend (Supabase, Postgres, MongoDB, Airtable or a webhook).
Step 3: Which eligibility and fraud rules do you need?
- Decide who can refer: any signed-in user, or paying customers only. A TrackRev credit program sets separate amounts for free and paid referrers, such as 50 credits and 200.
- Define a new customer as one with 0 accounts, 0 trials and 0 payments on record. In the Stripe Dashboard, limit the friend's promotion code to first-time orders (
first_time_transaction), which also blocks anyone who canceled a trial, and addmax_redemptionsandexpires_at, as Stripe's promotion code reference and Checkout discount guide describe. TrackRev doesn't create that discount: set the code program-wide under Tracking, or per referrer in the Partners table's Ref. code column. - Pay after the friend's first successful payment. TrackRev takes a refunded or disputed charge's commission back out and revokes a credit on a refund. Set the hold to your refund window, so 30-day refunds get a 30-day hold.
- Cap what one referrer can earn: on the 20% recurring design, 50 customers pay a referrer $5,880 (50 times $117.60).
- Block self-referral. TrackRev's credit programs run 3 checks (browser marker, device fingerprint, same IP on a different device) and revoke a grant with a recorded reason. Cash programs rely on the hold, refund reversal and marking a commission void or fraud.
Which disclosure and email rules apply to referrals?
Preventing self-referral fraud covers the cash side. The Federal Trade Commission's endorsement guidance says a rewarded endorser's connection to the brand should be disclosed clearly, so tell referrers to say they earn a reward.
Its CAN-SPAM guide says a seller offering coupons or discounts for forwarding a message may be responsible for compliance, with penalties up to $53,088 per email, so invitation emails need your postal address and an unsubscribe link.
In practice, a referrer posting a link on social media should write that a reward is earned if the friend subscribes, and each launch email should carry the footer shown in step 5.
Step 4: How do you set up tracking?
Tracking setup is a 3-part job: install the pixel, connect billing and create the program.
- Install the pixel on your marketing site and in the app, then connect Stripe, Polar, Lemon Squeezy or Paddle. We built the Stripe sync to take a read-only key, pull 30 days of charges on the first run, then sync hourly, or within seconds with the webhook scope.
- Set the Stripe Checkout Session's
client_reference_id, documented in the Checkout Session reference, to the visitor ID cookie. TrackRev falls back to the customer's email, and custom billing needs thereport-purchasecall with a secret key. Stripe Checkout attribution tracking shows the code. - Create the program (Affiliate program, then New campaign) with the values below and a destination URL on your own domain.
| Program setting | Default | Range or options |
|---|---|---|
| Cookie window | 60 days | 1 to 3,650 days |
| Hold period | 0 days | 0 to 180 days, counted from the close of each payout period |
| Minimum payout | $100 | $0 and up; smaller balances roll over |
| Payout period | Monthly | Weekly, every 2 weeks, monthly, quarterly or manual |
| Commission | 20% of each sale | 1 to 100%, or a flat amount per sale |
| Recurring | One-time | One-time, lifetime or a set number of months |
Defaults and limits on the TrackRev form for cash programs.
Step 5: Where do the invitation and launch emails go?
The invitation is a page, a widget and 3 emails. Ask right after a customer gets value, such as a first good result or a renewal.
TrackRev's dashboard embed gives you a refer-a-friend page inside the app with the user's link, rewards and 7 to 90 days of clicks, signups, purchases and conversion rate, and its widget adds a share card for busy pages.
Both take a publishable key plus 3 values: the signed-in user's ID, email and plan tier.
<script async src="https://app.trackrev.io/embed.js" data-key="pk_live_xxxxxxxx" data-user-id="user_123" data-user-email="jane@acme.com" data-user-tier="paid" data-mount="#refer-earn"></script>TrackRev doesn't send your campaign email, so launch messages go out through your own tool, with a link in the receipt email too. On a credit program, the credit.earned and credit.delivered webhooks can trigger row 3 of the table.
| When | Who gets it | What it says |
|---|---|---|
| Day 0 | Customers active in the last 30 days | The offer in one sentence and a link to the referral page |
| Day 7 | Active customers who haven't opened the page | Two lines they can paste into Slack or an email |
| Friend signs up, then reward earned | The referrer | Someone joined, then the amount and the payout or delivery date |
Subject: Give a friend 20% off, get a free month Hi [first name], You now earn a free month for every friend who becomes a payingcustomer, and they get 20% off their first purchase. Your link is on the Refer a friend page in your account settings:[page link] [Your name][Company and postal address][Unsubscribe link]Step 6: How do you test the whole path before launch?
A full-path test is a 5-check run from the referral link to a refund. First, open a test referrer's link in a private window and confirm a click appears in the dashboard.
Second, sign up as the friend with a second email address and the friend's discount code, and confirm the signup matches the referrer.
Third, pay with Stripe's test card 4242 4242 4242 4242, any future expiry and any 3-digit CVC, and expect a pending commission at the right amount or a credit grant marked earned.
Fourth, refund the charge and expect the commission to read refunded and the credit to be revoked. Fifth, sign up as another friend in the referrer's own browser and expect the credit to be blocked as a self-referral.
TrackRev accepts a restricted key starting with rk_test_, so Stripe test mode works. Commission tracking needs a paid plan, so test the money path on Indie at $29 a month.
Step 7: How do you measure results and review at day 60?
Count the referred customers who paid. Day 60 is long enough to see a monthly plan's second invoice.
| Metric | How to calculate it | Example at day 60 |
|---|---|---|
| Participation rate | Customers who copied or shared a link divided by customers active in the last 30 days | 120 / 1,000 = 12% |
| Click to paid conversion | Referred paying customers divided by referral clicks | 18 / 600 = 3% |
| Reward cost per referred customer | Rewards granted divided by referred paying customers | $1,058.40 / 18 = $58.80 |
| Share of new paying customers | Referred customers divided by all new paying customers | 18 / 90 = 20% |
| Months to recover the reward | Reward cost per referred customer divided by monthly gross profit | $58.80 / $39.20 = 1.5 |
| Retention gap | Month-3 retention of referred customers minus everyone else | Your own number |
Illustrative figures for a product with 1,000 active customers.
TrackRev's Customers page lists each referred customer with orders and commission.
In the example, $58.80 against the $120 ceiling leaves $61.20 of room, so the reward has headroom, and 18 customers at $58.80 cost about 25% of what 18 paid customers at $240 would.
If participation is low, move the page or change the timing before you touch the reward. Weak click to paid conversion points at the friend's offer or your landing page.
If referred customers churn faster than other channels, the reward may be attracting reward hunters, since the bank's referred customers churned 18% more slowly.
Where TrackRev fits
TrackRev is an affiliate platform for indie hackers and small SaaS teams, with no limit on tracked revenue, and we built it to run referral and affiliate programs from one dashboard.
Its Affiliate Program runs referral and affiliate programs with link tracking and revenue attribution built in, and it offers cash or credit rewards, two-sided friend rewards, the widget and dashboard embed, and refund reversal. Referral campaigns covers the setup.
The Free plan has 50 links and 1,000 tracked events a month, with revenue hidden.
Every paid plan includes the affiliate program: Indie is $29 a month for 1 workspace and 1 tracked domain, and Growth is $299 a year for up to 10 workspaces, up to 10 domains and unlimited team members.
Neither caps the commission tracked (pricing). Payouts are a PayPal or Wise CSV export that you mark paid, and TrackRev leaves the emails and the friend's discount code to you.
Pick a dedicated referral platform if you want those 2 jobs handled for you.
Found this useful? Share it.
Frequently asked questions
- TrackRev's Stripe attribution guide budgets about 15 minutes for tracking. The terms, the friend's discount and the emails take longer.
- Referrers are your customers, enrolled automatically and often paid in credit. Affiliates are outside promoters, usually paid cash after review and a W-9 or W-8 form.
- Only with a unique code per referrer, since a shared code credits nobody. In TrackRev a personal code credits its owner without a link click, and Stripe can restrict a promotion code to 1 customer.
- Stripe allows up to 20 discounts on a subscription but rejects a coupon and a promotion code made from the same coupon. State in your terms whether the offer combines with sale pricing.
- Yes. On a credit program, turn on Allow customers to become affiliates and pick the cash campaign to mirror. Only future conversions pay cash, and earned credits stay.
- Lengthen the cookie window, which accepts up to 3,650 days, and pay on the first charge. At high contract values referrers act like partners, so read the guide on B2B affiliate marketing for high-ACV SaaS.
- As much as your referrals earn. Neither Indie nor Growth caps commission or affiliate revenue, so 20% on $50,000 of referred sales is tracked the same way as 20% on $500,000.

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.