How to Build Custom Referral Codes on Shopify With Examples

Referral code

Shopify doesn’t include built-in referral tracking, which means creating referral codes that reward both the sharer and their friend requires a specialized app from the Shopify App Store. Once you install the right tool, you can generate unique codes, automate rewards, and turn your happiest customers into a growth engine that costs a fraction of paid advertising.

This guide walks you through the complete setup process—from choosing an app and configuring double-sided rewards to preventing fraud and optimizing your program with real examples from successful Shopify stores. You’ll learn exactly what referral codes are, why they outperform standard discounts, and how to launch a program that drives measurable revenue through trusted recommendations.

What Is a Shopify Referral Code?

A Shopify referral code is a unique discount code that tracks back to the specific customer who shared it, rewarding both the referrer and their friend when a purchase happens. Unlike regular discount codes that anyone can grab from a coupon site, referral codes connect to individual advocates in your customer base, letting you see exactly who brings in new buyers. This tracking transforms basic discounts into a growth system where every share gets measured, every advocate gets credit, and your customer acquisition happens through trusted recommendations instead of cold ads.

>> See more: Referral Codes vs Referral Links: Which Drives More Shopify Sales in 2026

Shopify referral code

Why Shopify Referral Codes Beat Traditional Discounts

Referral codes outperform standard discounts because they tap into something no paid ad can replicate—the trust between friends. When someone you know recommends a store, that endorsement carries weight that moves people from browsing to buying, fast.

Traditional discount codes attract bargain hunters scrolling through coupon sites who might buy once and disappear. Referral codes bring in customers who arrive pre-sold by someone they trust, and that difference shows up in your retention numbers and repeat purchase rates.

Here’s what makes referral codes different:

  • Lower acquisition costs: Word-of-mouth referrals typically cost less than paid ads while bringing customers who stick around longer
  • Higher trust factor: People trust recommendations from friends over any advertisement, making referrals your most credible marketing channel
  • Double engagement: Both the referrer and their friend become active customers—one feels rewarded for sharing, the other feels welcomed with a special offer
  • Built-in social proof: Every share acts as a mini-endorsement, creating authentic buzz that compounds as more customers join in

The math works too. If you offer $10 off through a referral code versus a generic $10 coupon, the referral brings someone more likely to buy, spend more, and come back.

Prerequisites Before You Create Codes in Shopify

Before launching your referral program, check that your Shopify store allows discount codes at checkout and that your payment setup supports automatic code application. Most Shopify plans include these features by default, though custom checkouts or third-party payment processors sometimes change things.

Shopify Discount Settings You Must Enable

Head to your Shopify admin under Settings > Checkout to confirm discount codes are enabled. This toggle controls whether customers can enter codes during purchase. If you’ve turned this off to simplify checkout or prevent coupon abuse, you’ll want to flip it back on for referral codes to work.

Checkout and Cart Requirements

Your cart and checkout pages display the discount code field where referred customers apply their codes. Test your checkout on both desktop and mobile to verify the code entry box appears clearly, because a hidden or confusing field kills conversions even when customers have codes ready.

Steps to Build a Custom Shopify Referral Code

Creating referral codes on Shopify requires an app since the platform doesn’t include built-in referral tracking. Shopify handles discount codes beautifully, but tracking who referred whom takes specialized software. The good news? Setup takes about 10 minutes once you pick the right app.

Step 1: Install a Referral App From Shopify App Store

Go to the Shopify App Store and search “referral program” to browse options like Bloop, ReferralCandy, or BON Loyalty. Look for apps offering automatic code generation, fraud prevention, and dashboard analytics—these features separate basic tools from platforms that scale with your business.

Bloop combines referral and affiliate management in one dashboard at a lower cost than competitors, plus it includes fraud detection that blocks self-referrals and suspicious activity right away. Click “Add app” on your chosen solution and authorize it to access your store data, which lets the app generate codes, track purchases, and distribute rewards automatically. Most apps offer free trials so you can test before committing.

Install Bloop from Shopify app store

Step 2: Configure Double-Sided Rewards and Code Format

Open your app dashboard and set up your reward structure—decide what the referrer earns (like $10 store credit) and what their friend receives (like 15% off first purchase). Double-sided rewards perform best because they give both parties a reason to participate: the referrer wants to share for the benefit, and the friend wants to use the code for the deal.

Setup reward

Next, customize your code format to match your brand. You might choose “FRIEND15” for a clean feel or “SARAH-LOVES-SHOP” for personalized codes with the referrer’s name. Branded prefixes help with recognition and prevent confusion with other promotional codes running simultaneously.

Referral link and refferal code on storefront
Referral link and referral code on storefront
referral code
Set up Referral code & Brand Prefix in BLOOP

Pro tip: Start with percentage discounts like 10-20% off rather than fixed dollar amounts, since percentages scale naturally with order size and feel more generous on larger purchases.

Step 3: Brand the Sharing Widget and Emails

Customize the referral widget on your site to match your store’s colors, fonts, and overall look. This consistency makes the program feel like a natural part of your shopping experience rather than a tacked-on feature. Upload your logo, adjust button colors, and write copy reflecting your brand voice.

Edit the automated email templates that go out when customers join your program and when their friends make purchases. These emails carry your brand into customer inboxes, so they deserve the same attention as your marketing campaigns—clear subject lines, compelling copy, and mobile-friendly formatting.

Brand the Sharing Widget and Emails

Step 4: Test the End-to-End Referral Flow

Create a test referral by signing up as a customer, generating a code, then using that code in a separate browser to complete a purchase. This walkthrough reveals friction points—maybe the code doesn’t apply automatically, or the reward doesn’t appear in the referrer’s account—that you can fix before real customers hit them.

Check that rewards appear correctly in both accounts, email notifications trigger as expected, and the discount calculates properly at checkout. Testing takes 10 minutes but saves hours of customer support later.

Step 5: Launch and Announce to Customers

Send a launch email to your existing customers explaining the new program, what they’ll earn, and how easy it is to share their code. Position this as a benefit you’re excited to offer rather than asking for a favor—”We’re rewarding our best customers” lands better than “Please help us.”

Add your referral program link to your website navigation, order confirmation emails, and social media bios so customers can find it easily. The best programs stay visible across multiple touchpoints without being pushy.

Get started free with Bloop and launch your referral program in under 10 minutes!

How Shopify Users Can Set Up a Referral Program in One Dashboard

Managing referrals alongside regular Shopify operations gets messy if you’re juggling multiple tools and spreadsheets. A unified dashboard brings everything together—referral links, affiliate partnerships, reward payouts, and performance metrics—so you can see what’s working and adjust quickly.

Single View for Referral and Affiliate Links

Modern referral apps let you manage both customer referrals and affiliate partnerships from the same interface. You’ll see all active advocates in one list, whether they’re loyal customers sharing with friends or content creators promoting to larger audiences, with performance data side by side.

This consolidated view helps you spot top performers quickly and adjust rewards accordingly—maybe your top customer referrer deserves a bonus, or an affiliate needs better promotional materials.

Manage referral & afiliate program in one dashboard

Automating Payouts in Store Credit or Cash

Set up automatic reward distribution so customers receive their credits or cash right after their referral makes a qualifying purchase. Store credit works well for product-based businesses since it guarantees the reward gets spent with you, while cash payouts via PayPal appeal to affiliates and high-volume referrers who prefer flexibility.

Automation prevents the awkward situation where customers email asking about their rewards—the system handles everything transparently, building trust and encouraging continued participation.

Tracking and Preventing Fraud on Your Shopify Referral Program

Referral fraud happens when people game the system through self-referrals, fake accounts, or coordinated abuse to collect rewards without bringing real customers. While most participants play fair, even a small percentage of fraud drains your budget and skews your data.

Real-Time Tracking Metrics to Watch

Monitor your referral conversion rate (what percentage of referred visitors actually buy), average order value from referrals versus other channels, and the time between link click and purchase. Sudden spikes in referrals from a single source, unusually high conversion rates, or patterns like multiple referrals from the same IP address often signal fraudulent activity.

Track reward redemption rates too. If lots of people earn rewards but few referrers ever redeem them, you might have set the reward threshold too high or made redemption too complicated.

Fraud Rules to Block Self-Referrals

Configure your referral app to prevent customers from referring themselves by blocking referrals when the referee’s email, shipping address, or payment method matches the referrer’s information. Most quality apps include these rules by default, but you can often add custom restrictions based on your specific fraud patterns.

Email verification for new referee accounts adds another layer of protection by ensuring real people with valid email addresses join through referrals. These safeguards work quietly in the background, stopping fraud without creating friction for legitimate participants.

Real-World Shopify Referral Code Examples and Results

Seeing how other Shopify stores structure their referral codes helps you skip the trial-and-error phase and launch with proven formats. The examples below show different approaches to code naming and reward tiers that work across various industries.

Custom Code Prefix Example Brand-Name-Friend

Fashion retailer Allbirds uses codes like “SARAH-FRIEND-25” where the referrer’s name appears in the code itself, creating a personal touch that makes sharing feel authentic. This format works well for brands with strong community vibes because it puts the customer’s identity front and center—when someone uses “SARAH-FRIEND-25” at checkout, they’re reminded that Sarah specifically recommended the store.

Allbirds referral code

Beauty brand Glossier takes a simpler approach with codes like “GLOSSIER-FRIEND” that emphasize the brand name while keeping the format clean and memorable. Both strategies work; the choice depends on whether you want to highlight individual advocates or reinforce brand recognition.

Tiered Rewards Example 10 Percent to 20 Percent

Activewear store Gymshark runs a tiered program where customers start earning 10% commission on referrals, but that jumps to 15% after five successful referrals and 20% after ten. This progression rewards your most active advocates with better earnings, incentivizing them to keep sharing rather than stopping after one or two referrals.

Gymshark referral program

Home goods retailer Parachute uses a different tier structure based on order value—referrers earn $20 for purchases under $100, $40 for orders between $100-$200, and $60 for orders over $200. This approach aligns advocate rewards with the actual value they bring to your business.

Tips to Promote and Optimize Your Shopify Referral Code

Building a referral program is just the start. The real results come from strategic promotion and continuous optimization based on what your data reveals.

Post-Purchase Widget Placement

Display a referral invitation right after customers complete their purchase, when excitement about your product peaks and they’re most likely to share. This “thank you” page placement catches people in a generous mood, and since they just experienced your checkout successfully, they can confidently recommend it to friends.

Keep the message short and the action simple—”Love what you ordered? Share and earn $10 credit” with a one-click button to generate their unique code works well.

Email and SMS Invite Sequences

Send a referral reminder email 7-10 days after purchase, once customers have received and enjoyed their products. This timing works because they’ve formed an opinion and are more likely to share genuine enthusiasm rather than premature recommendations.

Follow up with periodic reminders to customers who joined your program but haven’t shared yet—maybe a monthly “You have $X in potential rewards waiting” message highlighting what they could earn. Just keep the frequency reasonable; quarterly nudges maintain awareness without becoming annoying.

A/B Testing Reward Tiers

Run experiments comparing different reward amounts to find your sweet spot—maybe test $10 versus $15 credit, or 15% versus 20% discount. Track not just how many people share at each tier, but also the quality of referrals: conversion rate, average order value, and retention.

Test reward timing too: immediate gratification (instant credit) versus delayed rewards (credit after the friend’s order ships) to see which structure drives more sharing.

Element to TestOption AOption BMetric to Watch
Referrer reward$10 credit15% off next orderShare rate
Friend reward10% off$15 off $50+Conversion rate
Reward timingInstantAfter 30 daysReferral quality
Code formatGeneric (FRIEND10)Personalized (NAME-FRIEND)Redemption rate

Start Building Referral Codes With Bloop Free

You now have everything to launch a referral program that turns happy customers into your best marketing channel—the strategy, the setup steps, and real examples to guide your decisions. The difference between stores that succeed with referrals and those that don’t often comes down to simply starting, testing, and adjusting based on what your specific audience responds to.

Bloop makes this straightforward with a free plan that includes all core referral features, fraud prevention, and unlimited referrals—no credit card required to start. You’ll have your program live in under 15 minutes, and the dashboard shows you exactly which customers drive the most value so you can reward your top advocates.

Get started free and join 2,000+ Shopify merchants growing through word-of-mouth.

FAQs About Shopify Referral Codes

Can I import existing referral codes into a new app?

Most referral apps support CSV import of existing codes and customer data, though the specific format requirements vary by platform. Check your chosen app’s migration documentation or reach out to their support team before switching to confirm they can handle your data structure without losing tracking history.

Do referral codes work on Shopify POS checkouts?

Referral codes function through Shopify’s native discount system, so they work on both online and POS transactions automatically. Some apps even offer QR code sharing specifically for in-store referrals, letting customers scan a code at the register to apply their friend’s discount without typing anything.

Is there a limit to how many active referral codes I can run?

Shopify doesn’t impose limits on referral codes, but individual apps may restrict the number of active referrers based on your pricing plan. Most apps support unlimited active referrers on their higher-tier plans, while entry-level plans might cap you at 100-500 advocates—check the pricing details before committing if you expect rapid growth.

Hien Tran is a Product Marketing specialist at Bloop, where she translates product features into growth-driven solutions for Shopify merchants. By combining market insights with clear messaging, Hien ensures that store owners not only understand Bloop’s value but also know how to apply it to boost revenue, loyalty, and customer acquisition.


Leave a Reply

Your email address will not be published. Required fields are marked *