What this method tracks
What it can’t track
This method trades precision at the top of the funnel for reach at the bottom. Know what you’re giving up.- Anything before checkout. No clicks, no visits, no click-to-sale conversion rate for the code itself. If an affiliate mentions you to 50,000 listeners and two buy, all you’ll ever see is the two.
- A customer who forgets the code. This is the real cost of the method, and it’s larger than people expect. If they don’t type it, the sale is unattributed and the affiliate isn’t paid.
- A checkout where the code can’t be entered. Your checkout has to actually offer a promotion code field — see Step 3.
- Sign-ups before payment. The referral only exists once a discounted payment goes through.
- Which specific piece of content drove the sale, unless you give each affiliate several codes.
- Live payments while you’re connected in test mode, and the reverse. Referly deliberately ignores the mismatched ones.
Before you start
A Stripe account you can log into as an administrator
A decision on the customer discount
Your commission plan set up
Step 1: Connect your Stripe account
Nothing about coupons works until Stripe is connected, because Referly creates and reads the codes inside your Stripe account. You don’t create API keys — you authorize Referly’s app from inside Stripe.Open the connect dialog
Choose live or test
Authorize Referly in Stripe
Confirm the connection
Step 2: Give your affiliates codes
There are two routes. Pick one, or mix them.Option A: let Referly create a code for every affiliate
This is the hands-off route. You set the customer discount once in your program details — the amount and whether it’s a percentage or a fixed sum — and from then on every affiliate who joins gets their own code created for them. Referly builds each one in your connected Stripe account as a coupon plus a matching customer-facing code, so the codes are real Stripe codes that work at your checkout with no extra setup. The discount is set to apply to every invoice, not only the first — so a customer who subscribes with a code keeps their discount on every renewal, and the affiliate keeps earning on every renewal too. For the full walkthrough of this option, see auto-generated codes.Option B: create codes in Stripe and bring them in
Use this when you want different discounts for different affiliates, or when you already have codes running in Stripe.Create the coupon in Stripe
Add a customer-facing code
SARAH20. This is the part the customer actually types — a coupon on its own has no code attached to it.Choose the duration deliberately
Bring the codes into Referly
Assign a code to an affiliate
Changes in Stripe flow back automatically
Once codes are connected, you don’t have to keep the two systems in step by hand:- Renaming a coupon in Stripe updates it in Referly.
- Redemption counts update as customers use the codes.
- Turning a code off in Stripe marks it inactive in Referly.
- Deleting a coupon in Stripe removes it from Referly.
Step 3: Let customers enter a code at checkout
A code nobody can type is worth nothing, and this is the step people miss. Stripe checkout only shows a promotion code field if you’ve turned it on. Where you turn it on depends on how customers pay:Track clicks as well
This step is optional. Coupon tracking works with nothing installed on your site at all — but without the tracking script you’ll have no click data anywhere in Referly, and affiliates who do share links won’t have their clicks counted. If you want both, open Integrations, find the Stripe Coupon Codes card, and copy the script from the guide into thehead section of your pages:
What wins when a customer has both
A customer can arrive through one affiliate’s link and type a different affiliate’s code. Referly resolves it in this order:- The promo code used at checkout. The code owner gets the sale, even when the click came from someone else.
- The referral identifier from a link click, if no affiliate’s code was used.
- The customer’s email matching an existing referral, which is what keeps renewals attached to the original affiliate.
How renewals behave
Renewals are where coupon tracking is unusually strong. When the discount is set to apply forever, it stays attached to the subscription. Every renewal invoice carries the same code, so Referly can see the affiliate on the renewal itself. On top of that, the renewal is matched to the original referral by the customer’s email. Two independent routes to the same answer means renewals rarely fall through. If you set a code to apply once, the discount disappears after the first invoice. Renewals then rely on the email match alone — still usually fine, but with one less safety net.Step 4: Test the whole flow
Test before you hand a code to a single affiliate, with your Stripe connection showing the yellow Test Mode badge.Switch Stripe to a sandbox
Make sure a test affiliate has a code
Check the code exists in Stripe
Buy something using the code
4242 4242 4242 4242, any future expiry, and any three-digit security code. The full list is in Stripe’s testing guide.Confirm it in Referly
Check the redemption count moved
Go live
- On the Integrations page, open the Stripe panel and select Disconnect.
- Select Connect Stripe Account and authorize your live account.
- Confirm the badge is green and reads Connected.
- Generate or sync your codes again — sandbox codes do not exist in your live account.
Troubleshooting
Customers say the code doesn't work
Customers say the code doesn't work
There's no place to enter a code at checkout
There's no place to enter a code at checkout
The code worked but no commission was created
The code worked but no commission was created
Nothing appears in Referly at all
Nothing appears in Referly at all
Affiliates don't have codes
Affiliates don't have codes
The wrong affiliate got the sale
The wrong affiliate got the sale
Renewals stopped paying commission
Renewals stopped paying commission
Redemption counts look wrong in Referly
Redemption counts look wrong in Referly