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, Founder
On this page
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 pays your own customers for introducing new ones. Outside promoters belong in an affiliate program, covered in how to create an affiliate program.
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 a referred customer is 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.
Step 1: Set a goal and a reward budget
Pick one number to move: referred customers who pay each month. My rule of thumb caps 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.
Step 2: Design the reward
A one-sided program 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.
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.
Cash or credit
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.
TrackRev delivers credit into your own backend (Supabase, Postgres, MongoDB, Airtable or a webhook).
Step 3: Write the eligibility and fraud rules
- 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 no account, trial or payment 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. 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.
- Decide how much one referrer can earn. On the 20% recurring design, 50 customers pay a referrer $5,880 (50 times $117.60), which is either a bug or the partner you want.
- 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.
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.
Step 4: Set up tracking
- Install the pixel on your marketing site and in the app, then connect Stripe, Polar, Lemon Squeezy or Paddle. Stripe takes a read-only key, pulls 30 days of charges on the first sync, then syncs hourly, or within seconds with the webhook scope.
- Set the Stripe Checkout Session's
client_reference_idto 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: Place the invitation and write the launch 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 and 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 the last row.
| 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: Test the whole path before you announce it
| Check | What to do | Expected result |
|---|---|---|
| 1 | Open a test referrer's link in a private window | A click appears in the dashboard |
| 2 | Sign up as the friend with a second email address and the friend's discount code | The signup matches the referrer |
| 3 | Pay with Stripe's test card 4242 4242 4242 4242, any future expiry and any 3-digit CVC | A pending commission at the right amount, or a credit grant marked earned |
| 4 | Refund the charge | The commission reads refunded and the credit is revoked |
| 5 | Sign up as another friend in the referrer's own browser | The credit is 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 one.
Step 7: 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.
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's Affiliate Program runs referral and affiliate programs on one data model, with 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: Starter is $39 a month ($351 billed yearly) for 1 workspace and $10K of commission tracked a month, Growth is $99 for unlimited workspaces and $100K, and Scale is $199 with priority support (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 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.
- Starter tracks up to $10K of commission a month, which at 20% covers $50,000 of referred sales ($10,000 divided by 0.20). Growth raises the cap to $100K, or $500,000 of sales at 20%, and Scale has no cap. Credit grants don't count toward it.

Written by
Founder, TrackRev.io & Contant.io
Muzahid Maruf is the founder of TrackRev.io and Contant.io. He writes about marketing attribution, link tracking, and revenue analytics for SaaS teams.
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