Tips for your store
Referral codes: how customers bring in new customers
A referral code turns word of mouth into a program: your customer passes a code to friends, they save on their first order, and the customer earns a reward. Shopify gives you the codes, but it doesn't reward the referrer on its own. And if your store sends the invitation email itself, the law may treat it as your marketing email.

1 How a referral program works
A referral program has three parts. The referrer, an existing customer, gets a personal code or link. The referred friend redeems it on their first order and saves. And the referrer earns a reward once the friend has bought.
You can reward one side or both. Shopify's guide describes double-sided discounts that benefit both the referrer and the referred friend. Behind this is trust: in a 2015 Nielsen survey, 83% of online respondents in 60 countries said they completely or somewhat trust recommendations from friends and family.
2 What Shopify can do on its own
You create the code for referred friends like any other discount code, under Discounts > Create discount. The steps are in our guide to creating a discount code. For a referral program, these settings matter most:
- “Limit to one per customer”: Shopify recognizes the customer by email address or phone number.
- “Limit number of times this discount can be used in total”: caps how often the code works overall, in case it spreads.
- Minimum requirements: a minimum purchase amount makes sure the first order still pays off for you.
- “Promote” > “Get a shareable discount code”: a link that puts the code in the cart when opened, plus a QR code. It only works while the discount is active.
3 What Shopify can't do: reward the referrer
A discount code doesn't know who passed it on. Shopify's discount settings have nothing that recognizes a referrer and credits them a reward after their friend buys. Shopify's own guide to referral programs points to referral apps in the Shopify App Store for that.
A referral app handles the missing part: it matches the friend's order to the referrer and hands out the reward. Ask before you install one: When does a referral count, at purchase or after the return window? Does the app catch self-referrals? Is the reward a discount code, points or money?
4 Protect the program from abuse
A known gap is self-referral: a customer redeems their own code with a second email address. “Once per customer” only slows this down, because Shopify recognizes the customer by email address or phone number. So only pay the reward once the friend's order is paid and can no longer be returned, and compare name and shipping address with the referrer's.
A code can also end up on coupon sites. According to the trade magazine Modern Retail, codes spread quickly through browser extensions like Honey. Personal codes that work only once limit the damage. How to generate hundreds of them at once is covered in our guide to unique bulk discount codes.
Be careful with customer segments: if you limit the code to a segment, Shopify says it only applies to customers who already have a customer profile in your store. Someone ordering for the first time doesn't have one yet, and that's usually exactly the referred friend.
5 Rewards and invitation emails: the rules
In the US, the FTC says that if a seller offers money, coupons or discounts for forwarding a message, the seller may be responsible for following the CAN-SPAM Act. And when a customer shares your link and gets something for it, such as a discount on a future purchase, the FTC says a disclosure is appropriate.
In Germany, the Federal Court of Justice ruled in 2013 that a store's “recommend to a friend” form counts as the store's own marketing email. Without the recipient's prior consent, it's unlawful there. The safer setup is to let customers pass the code on themselves, in their own message. And the email that sends your customers their code is marketing too, so send it to subscribers who opted in. This isn't legal advice.
6 Measure what the program brings in
Shopify's “Sales by discount codes” report groups your sales by discount and discount code. It shows how often the referral codes are redeemed. Then work out what a referred customer costs you: the friend's discount plus the referrer's reward. Compare that with what a new customer costs you through ads.
Referred customers refer more themselves. A study in the Journal of Marketing Research found that they made 31% to 57% more referrals than non-referred customers with comparable purchase activity. So remind referred customers that they came through a referral, and give them a code of their own right away.
Sources
- Shopify Blog: Referral program ideas(opens in a new tab)
- Schmitt, Skiera, Van den Bulte: Referral Programs and Customer Value, Journal of Marketing (2011)(opens in a new tab)
- Nielsen: Global Trust in Advertising (2015)(opens in a new tab)
- Nielsen: press release on the 2015 survey (30,000 respondents, 60 countries)(opens in a new tab)
- Shopify Help Center: Amount off discounts (usage limits, minimums)(opens in a new tab)
- Shopify Help Center: Managing discounts (shareable link and QR code)(opens in a new tab)
- Shopify Help Center: Discount codes FAQ (customer segments)(opens in a new tab)
- Shopify Help Center: Sales reports (sales by discount codes)(opens in a new tab)
- Modern Retail: How promo code leaks are impacting profit margins (2024)(opens in a new tab)
- FTC: CAN-SPAM Act, A Compliance Guide for Business (forward-to-a-friend)(opens in a new tab)
- FTC: Endorsement Guides, What People Are Asking(opens in a new tab)
- BGH, judgment of 12 September 2013, I ZR 208/12 (recommendation email, German)(opens in a new tab)
- Gershon, Jiang: Referral Contagion, Journal of Marketing Research (2024)(opens in a new tab)
- Harvard Business Review: Research, Customer Referrals Are Contagious (2024)(opens in a new tab)
Common questions
What is a referral code?
Can Shopify reward the referrer automatically?
Can I reward customers for referring friends?
What's the difference between a referral code and an affiliate code?
Related reads
Discount codes for influencers
One code per partner, clear limits, honest reporting, and the disclosure rules in the US and Germany.
Read moreWin back existing customers
Measure the gap between orders, use segments, time win-back emails, and use codes that don't end up on coupon sites.
Read moreHundreds of unique discount codes are needed
One Shopify discount can carry many codes, and a store can have up to 20 million unique codes. Hand-E AI Discounts generates up to 1,000 codes per campaign on every plan, with your own prefix. It creates them as one Shopify discount and gives you a CSV file.
Read more