building-with-ai·9 min read·

Your first referral loop: turn happy customers into your next channel

You have a dozen paying customers and support under control. The cheapest next customer is one your happy customers bring you. Here is how to build a dead-simple referral loop with Claude Code and Stripe in an afternoon, instead of buying a platform you do not need yet.

Your first referral loop: turn happy customers into your next channel

You have a dozen paying customers, support is under control, and you can read your weekly numbers without flinching. The cheapest customer you will ever get is the one an existing happy customer brings you. So the natural next move is to build a referral loop.

Search "SaaS referral programme" and every result tells you to buy a tool. GrowSurf, ReferralHero, Viral Loops, Reditus, Tremendous, refgrow. The advice is always the same: pick a platform, launch a two-sided viral loop, engineer the share mechanics. That advice is written for SaaS companies with a marketing team and thousands of users. You have twelve customers and you are the marketing team.

Here is the version that actually fits where you are: do not buy a referral platform, and do not try to manufacture virality. A referral programme does not create word of mouth. It captures and amplifies word of mouth that already exists. Your job at 3 to 30 customers is to check that the word of mouth is real, then hand-build the simplest possible loop in an afternoon with Claude Code, and measure one number.

The one prerequisite: are people already referring you?

Before you write a line of code, answer one question honestly. Are customers already telling other people about you, unprompted, with no incentive?

You can find out in an afternoon. Go back to the "how did you find us" answers from your first ten customers (you collected these when you went looking for a repeatable acquisition channel). If two or three of them say "a friend told me" or "someone in my Slack mentioned it", you have organic referral. That is the signal. A referral programme will give that existing behaviour somewhere to go and a reason to happen more often.

If nobody is referring you unprompted, a referral programme will not save you. It will just be a button nobody presses. The honest read is that your product is not yet good enough or sticky enough for people to put their reputation on the line by recommending it. That is a retention problem, not a growth problem, and the fix is upstream: go back to activation and retention and make the product something people miss when it is gone. Referral comes after retention, never before it. Building it first is the classic mistake of pouring acquisition into a leaky bucket.

So the test is binary. Organic referrals happening? Build the loop. Not happening? Close this tab and go fix retention. Come back when someone refers you without being asked.

Build it, do not buy it

Assume the signal is there. The instinct now is to sign up for a referral platform so you "do it properly". Resist it. At your scale a referral SaaS is the wrong call for three reasons.

It is overhead you do not need. A platform is another monthly bill, another login, another integration to maintain, and another place your customer data lives. You are trying to keep the business lean enough that one person can run it. Adding a tool to manage twelve referrers is like hiring a logistics company to post one parcel.

It is a data silo. The referral platform wants to own the referral data, the rewards, and often the customer relationship. You want all of that in your own database, next to everything else you know about a customer, so you can answer questions later without exporting from someone else's dashboard.

And it is genuinely unnecessary, because the entire loop is tiny. Strip a referral programme down to its bones and it is three things: a unique code for each customer, a way to record that a new signup came from that code, and a reward applied when the referred person starts paying. That is it. No platform sells you anything you cannot build yourself in an afternoon with Claude Code, and what you build will fit your product exactly instead of bolting a generic widget onto it.

Buy a tool later, when the manual loop is clearly working and the admin starts to hurt. Not now.

The simplest loop that actually works

Here is the whole thing, end to end.

Every existing customer gets a unique referral code, baked into a shareable link like yourapp.co.uk/?ref=ABC123. When a new person lands on that link and signs up, you record which code sent them. When that new person becomes a paying customer, you reward the original referrer. Done.

A few deliberate simplifications keep this buildable by one person.

Reward one-sided, with account credit. You can reward just the referrer, just the new customer, or both. Two-sided rewards generally convert better, and you will read everywhere that you should do that. Ignore it for now. One-sided, referrer-only, is simpler to build, cheaper to run, and completely fine at this scale. The cleanest reward is account credit, for example one month free, applied to the referrer when their referral converts. Credit costs you nothing until the loop actually works, it ties the reward to revenue rather than to clicks, and it keeps the rewarded person inside your product rather than handing out cash you have to track. You can revisit two-sided later if the numbers justify it.

Reward on payment, not on signup. Pay out when the referred person becomes a paying customer, never when they merely sign up. Rewarding signups invites junk: a free signup costs the referrer nothing and earns them a reward, so you get fake accounts and zero revenue. Tie the reward to the moment money changes hands and the incentive is aligned with the only thing that matters.

One obvious place to share, and make it fast. The loop dies if customers cannot find it or sharing is a faff. Put one clear "invite a friend" surface in the app, with the link already built and a copy button, so sharing takes under thirty seconds. Do not bury it three menus deep, and do not ask the customer to assemble the link themselves.

That is the entire design. Now build it.

Building the loop with Claude Code and Stripe

This is an afternoon of work, and most of it is plumbing Claude Code is good at. Build it in plan mode first so you can see the diff before any code lands, and keep each step a narrow change.

Step one: give every customer a code. Add a referral_code column to your customer or profile table in Supabase and backfill it for existing customers with a short, unguessable string. Ask Claude Code to generate codes that are URL-safe and collision-checked against the table. New customers get a code on signup. This is a single migration plus a small hook in your signup flow.

Step two: capture the referrer on signup. When someone arrives with ?ref=CODE, stash the code (a cookie or query param carried through to signup) and, when they create their account, write a referred_by field on the new customer that points at the referrer. Resolve the code to the referring customer server-side so a user cannot tamper with it from the browser. If the code is missing or invalid, just record nothing and carry on; a broken or absent ref should never block a signup.

Step three: reward on first payment. This is the one part to build carefully, because it touches money. When a referred customer makes their first successful payment, apply the reward to the referrer. In Stripe that is either a credit on the referrer's customer balance or a coupon applied to their next invoice. Trigger it off the payment event you already handle (you wired the money path when you set up auth and billing). Two rules make this safe. Make it idempotent: a referrer must be credited exactly once per converted referral, never twice if a webhook fires again, so check whether you have already rewarded this specific referral before applying credit. And keep it server-side: the decision to pay a reward lives on your server reading your database and Stripe, never anything the browser can ask for.

Before you ship, run the money-path regression check you built when you set up observability: in Stripe test mode, run a normal payment with no referral (reward must not fire), a referred payment (reward fires once), and a duplicate webhook (reward does not fire again). Claude Code can write those three test cases for you. When they pass, ship it. At twelve customers you do not need a staging environment for this; you need the money path proven in test mode.

Step four: the share surface. Add one simple in-app panel that shows the customer their link with a copy button and a plain line of text explaining the reward. Keep the copy honest and specific: "Share your link. When a friend you invite becomes a paying customer, you get a free month." No countdown timers, no fake scarcity, no leaderboard. One link, one button, one sentence.

A quick word on honesty, because you are in the UK

Personal referrals, where a customer tells a friend or mentions you in a group they are part of, are just word of mouth with a tracking link. That is fine and needs no disclosure.

Where it changes is if you start rewarding customers for posting publicly about you, for example "post about us on LinkedIn and get a month free". The moment there is a reward in exchange for a public endorsement, that post is advertising under UK advertising rules, and the person must disclose that it is an ad or incentivised. The ASA enforces this and it applies to you, not just to influencers.

The clean approach at your stage is to keep referrals personal: a link a customer shares with people they actually know, rewarded on conversion. Do not turn your customers into undisclosed advertisers to chase reach. It is a reputational and legal risk that buys you very little when you have twelve customers, and it cheapens the genuine recommendations that make referral work in the first place.

Measure one number

You built a loop. Now resist the urge to build a dashboard for it. At this scale you track exactly one number: referred signups that convert to paying customers, over a four-week window. Not link clicks. Not link views. Not "viral coefficient". Clicks are vanity; a converted referral is a customer.

Read it after four weeks and make one decision.

If referrals are converting, the loop works. Make the share surface more prominent, mention it in your onboarding and your support replies, and otherwise leave it alone. You found a channel that compounds.

If it is flat, the loop is not your problem. The word of mouth you thought you had is not really there, or it is not strong enough to act on with a small nudge. Do not bolt on bigger rewards or a two-sided structure to force it; that is treating a retention symptom with a growth tool. Go back to the product and to retention, get customers to the point where they genuinely cannot stop talking about you, and the loop will start working on its own.

Either way, one number told you what to do next. That is the whole point.

When to stop, and when to graduate

The fastest way to waste a week is to over-build this. At 3 to 30 customers you do not need referral tiers, milestone rewards, a points system, a leaderboard, fraud detection, or a referral platform. Every one of those is a solution to a problem you do not have yet. They add code to maintain and decisions to make in exchange for zero extra customers.

You graduate to a proper referral tool when two things are both true: the manual loop is clearly driving conversions, and the admin of running it by hand has started to genuinely cost you time. That tends to land somewhere around a hundred paying customers, when you are processing enough referrals that idempotency edge cases, reward variations, and reporting become real work. At that point you will know exactly what you need, because you will have run the simple version long enough to feel its limits, and choosing a platform becomes a quick, informed decision instead of a guess.

Until then, the build-it-yourself loop is not a compromise you settle for. It is the correct tool for the job. One code, one tracked signup, one reward on payment. An afternoon with Claude Code. Then back to the number.

Frequently asked

When should a UK SaaS launch its first referral programme?

Only once customers are already referring you unprompted, with no incentive. A referral programme amplifies existing word of mouth, it cannot manufacture it. Ask your first ten customers how they found you; if some say a friend or contact told them, you have the signal. If nobody refers you organically, that is a retention problem, so fix the product and stickiness first and come back later.

Should I build my referral programme or use a tool like GrowSurf or ReferralHero?

Build it at this scale. A referral platform is another monthly bill, another login, and a data silo for what is really a tiny feature: a code per customer, a tracked signup, and a reward on payment. Claude Code can build that in an afternoon and it fits your product exactly. Graduate to a dedicated tool only around a hundred-plus customers, when the manual loop is clearly working and the admin starts to hurt.

Should the reward be one-sided or two-sided?

One-sided, rewarding just the referrer, at this stage. Two-sided rewards generally convert better, but one-sided is simpler to build, cheaper to run, and perfectly fine at 3 to 30 customers. Use account credit such as a free month, applied when the referred person becomes a paying customer, so it costs you nothing until the loop actually works. Revisit two-sided later if the numbers justify it.

What should I reward, a signup or a payment?

A payment. Rewarding signups invites junk accounts because a free signup costs the referrer nothing yet earns a reward. Tie the reward to the moment the referred person first pays, so the incentive is aligned with real revenue rather than vanity signups. Build the reward server-side and idempotent so a referrer is credited exactly once per converted referral, even if a webhook fires twice.

Are there UK rules I need to follow for incentivised referrals?

Personal referrals, where a customer shares a link with people they know, are just word of mouth and need no disclosure. But the moment you reward customers for posting publicly about you, that post becomes advertising under UK ASA rules and must be disclosed as incentivised. The clean approach at your stage is to keep referrals personal and rewarded on conversion, rather than turning customers into undisclosed public advertisers.

The newsletter

One UK business idea, every Thursday

By Tim Bland. Free.