1. What the referral program does
Every active subscriber gets a unique referral code, shown in their customer portal with a shareable link. When a friend uses it to start their first subscription, the friend gets a discount on that order and the advocate is emailed a single-use reward code. You set both sides of the deal — and you only pay when a referral actually converts, which makes it one of the cheapest subscriber-acquisition channels a store can run.
Everything runs on real Shopify discount codes and the orders webhook — no cart scripts, no manual tracking, no spreadsheets.
2. How a referral works end to end
1 Code issued. While the program is on, each subscriber gets a unique referral code the first time Sublyra sees them. It appears in their customer portal with a shareable link.
2 Friend clicks the link. The link is Shopify's native discount link (your-shop.com/discount/CODE), so the friend's discount applies itself at checkout — no typing, no cart attributes, no storefront JavaScript.
3 Friend orders. The friend checks out with their first subscription. The orders webhook reads the discount codes on the order.
4 Conversion recorded. If the code belongs to a different customer, the order is paid, and it's the friend's first subscription order, a referral reward is queued for the advocate. Fraud guards in section 5 apply here.
5 Advocate rewarded. The job runner creates a single-use discount code worth your configured reward amount in Shopify, then emails it to the advocate: "Your referral reward is here — $15 off at Your Shop", with the code displayed and a Use my reward button that applies it automatically.
3. Set it up
Go to Retention → Loyalty & referrals → Referral program. Three settings:
| Setting | What it does | Range / default |
|---|---|---|
| Give subscribers a referral code | The master switch. On means every subscriber gets a unique code and shareable link in their portal. | Off by default |
| Advocate reward ($) | The fixed amount the advocate's single-use reward code is worth, in dollars. | $1–$500, default $15 |
| Friend discount (%) | The percentage off the friend's order when they use a referral code. | 5–60%, default 20% |
1 Tick Give subscribers a referral code.
2 Set the advocate reward and friend discount. Total both sides and compare to your paid CAC — if a subscriber from ads costs you $40, a $15 reward plus 20% off a first order is usually money well spent.
3 Click Save referral settings. Codes start being issued to subscribers from that moment.
write_discounts permission. New installs grant everything on the single consent screen at install; if your store installed earlier, an amber "Additional permission needed" banner appears on the page with a Grant access button — click it before enabling the program, so codes can actually be created.
4. The two kinds of codes
Referral codes (advocate → friend)
- One unique code per subscriber — 8 characters from an unambiguous alphabet (no 0/O or 1/I/L), because these codes get read out loud and typed by hand.
- Backed by a real Shopify discount code worth your friend-discount percentage, valid once per customer — many friends can use the same advocate's code, each at most once.
- Created lazily: the first time Sublyra sees a subscriber while the program is active. If creation hiccups, it simply retries next time — no codes, no errors for the subscriber.
- The shareable link is Shopify's own
/discount/CODEURL, so it behaves exactly like any discount link you'd build by hand.
Reward codes (you → advocate)
- A fresh code per successful referral, named like
REWARD-K7P3X9QD. - Single-use and fixed-amount (your configured reward), created in your Shopify discounts like any code you'd make yourself.
- Delivered by email only — the advocate gets one email with the code, the amount, and a button that auto-applies it. The email spells out that the code is good for one order.
5. Fraud guards
Referral programs attract gaming, so the conversion rules are strict and applied identically on every order path:
| Guard | What it blocks |
|---|---|
| No self-referrals | The code's owner can't convert their own code — checked by customer record and by matching email address, so a second account with the same email doesn't slip through. |
| First subscription order only | Any prior recorded order — checkout or recurring, any status — disqualifies the conversion. A returning customer is not a referral. |
| Paid orders only | A pending or authorized charge hasn't converted. The reward queues only when the money lands. |
| Exactly once per order | The conversion is keyed to the order, so a replayed webhook or a race between order paths can never queue the same reward twice. |
| Merchant codes ignored | A discount code that isn't a Sublyra referral code (your own marketing codes) is simply skipped. |
6. Tracking and reward statuses
The Referral program section shows live stats:
- Referral codes — subscribers holding a code.
- Conversions — referral orders recorded.
- Rewards issued — count and total dollar value fulfilled.
Below them, the recent rewards list shows each reward with the advocate, amount, code and status:
| Status | Meaning |
|---|---|
| Pending | The conversion was recorded; the reward code and email are queued. This is normal for a short window after the friend's order. |
| Issued | The single-use code was created in Shopify and emailed to the advocate. Done. |
| Skipped | Deliberately not fulfilled — for example the program was switched off before fulfilment, or the advocate's data was redacted under a privacy request (a redacted customer gets no email and no code in their name). |
loyalty.reward_earned event — so your own systems can react to referrals in real time. See the developer docs.
7. FAQ
Who receives the reward email?
The advocate, at the email address on their customer record — it's delivering something they earned. The one hard exception is privacy: customers whose data has been redacted under a GDPR request get no email and no code in their name, and the reward is marked skipped.
What happens if I turn the program off?
Unticking "Give subscribers a referral code" stops new conversions from recording and marks any still-pending rewards as skipped. Codes already in subscribers' hands remain valid Shopify discounts until you delete them under Discounts in Shopify admin — treat codes you've shared as permanent.
Can the same friend use two different advocates' codes?
No — first subscription order only. Once a customer has any recorded order, no referral code of theirs converts, whichever advocate's code they try.
Where do subscribers find their code?
In their customer portal, alongside a shareable link they can paste anywhere — messages, social, email. The portal preview in the Sublyra admin ("View as") shows you exactly what they see.
Which plan do I need?
Growth ($79/mo) and above include the referral program together with loyalty rewards, store credit and streaks. Paid plans start with a 30-day free trial.
Related guides
- Loyalty rewards & store credit — the reward ladder and streaks on the same page.
- Win-back campaigns — bring lapsed subscribers back with a discount code.
- Smart retries & dunning — protect the revenue referrals bring in.
- Plans & pricing — what's included on each plan.