Stripe takes your payments. It doesn't know who sent you the customer.
There's no affiliate tracking built into Stripe. To pay partners for the customers they refer, something has to connect three things: the click on an affiliate's link, the person who signs up, and the payment that lands in Stripe days or weeks later. Then it has to keep doing that for every renewal, refund and dispute.
This tutorial shows you how to track affiliate referrals with Stripe using Arkvon, in four steps. The code part is one prompt you paste into your AI assistant, and a live test then checks it on your real site, without a payment. It works with Stripe Checkout, Pricing Tables, Buy Buttons, Payment Links, subscriptions and one-off payments. At the end, there's an honest look at how the setup compares with Rewardful, Tolt, FirstPromoter and PartnerStack.
Plan for about 30 minutes, including the test.
How affiliate tracking with Stripe works
Every Stripe affiliate tool works roughly the same way. The referral has to travel from the affiliate's link all the way onto the Stripe payment:
- The affiliate shares their link. With Arkvon, it looks like
linkarkvon.com/their-code. - A visitor clicks it. The click is recorded, and the visitor lands on your site with
?ref=their-codein the URL. - Your site remembers the referral. A small script saves it in a cookie, so it survives the visitor browsing around, leaving and coming back.
- The referral goes onto the payment. When the visitor checks out, your site passes the referral code to Stripe.
- Stripe reports the payment. The affiliate tool sees the payment, finds the referral code on it and credits the affiliate. It does the same for every renewal, and reverses the commission if the payment is refunded.
That fourth link is where most setups break. A cookie in the visitor's browser means nothing to Stripe. Unless the code is attached to the Checkout Session or payment, the sale can't be traced back to the affiliate.
What you need before you start
- The Stripe account your customers already pay on.
- A checkout that can carry the referral: Stripe Checkout (Pricing Tables and Buy Buttons use Checkout too), Payment Links, subscriptions you create with the Subscriptions API, or one-off payments you create with the Payment Intents API.
- An AI assistant such as Cursor, Claude Code, Lovable, Bolt or Replit, opened on your project. ChatGPT works too: it asks which framework you use, then gives you the code to paste. No AI tool? A developer can follow the manual steps instead.
- An Arkvon campaign with your commission set.
Creating subscriptions directly with Stripe's Subscriptions API, for example behind your own payment form? Put the referral in the subscription's metadata when you create it. Arkvon credits the first payment from there, and every renewal after it.
Step 1: Create your campaign
A campaign is your affiliate program: what affiliates earn, and for how long. Commissions can be a percentage of each payment or a fixed amount, and you choose how long they last:
- One-time: only the first payment earns a commission.
- Recurring for a set number of billing cycles, for example 30% of the first 12 monthly payments.
- Recurring for the customer's lifetime.
You also set a holding period. Commissions stay on hold for 30 days by default before they become payable, so a refund in the first month cancels the commission before you've paid it out.
Not sure what to offer? The affiliate commission calculator helps you check what you can afford, and how to start an affiliate program for your SaaS covers commission design in depth.
Step 2: Connect your Stripe account
In Arkvon, open Integrations and click Connect Stripe. Stripe opens and asks you to install the Arkvon app. Choose the account your customers pay on, approve, and you're sent back to Arkvon with Stripe connected.
The app only has read access. It can see the checkouts, payments, invoices, subscriptions, refunds, disputes and customers it needs to credit affiliates. It can't charge anyone, issue refunds or change anything in your account.
There are no API keys to paste and no webhooks to set up. Stripe sends payment events to Arkvon through the app.
Connect the account your customers actually pay on. If you connect a different one, Stripe never reports those payments to Arkvon, and referred sales won't show up.
Step 3: Install tracking with one AI prompt
This is the part that's usually fiddly: adding a script, then getting the referral onto every checkout. With Arkvon, it's copy and paste:
- In Arkvon, open Integrations. Under Install tracking, keep With AI selected.
- Click Copy setup prompt. Your campaign ID and website are already in it.
- Paste it into your AI assistant, opened on your project, and let it run. ChatGPT can't see your code, so it first asks which framework you use and where your checkout and signup form are, then gives you the code to paste.
The prompt tells your assistant exactly what to do:
- Add the Arkvon tracking script to every page, starting with the page affiliate links send visitors to. It saves the referral in a cookie for 30 days, shared across your subdomains, so a visitor who lands on your website and pays in your app is still tracked. If that page isn't in your code, for example a Framer, Webflow, WordPress or Shopify site, your assistant tells you to paste the tag there too.
- Let the script through your Content-Security-Policy, if your site sends one. Otherwise the browser blocks the script and nothing is tracked.
- Find every place your customers pay and attach the referral where Arkvon reads it:
affiliateCodein the metadata of Checkout Sessions, subscriptions you create with the API and one-off payments, with the signedarkvon_trktoken next to it so Arkvon can check the referral wasn't edited. Stripe Pricing Tables, Buy Buttons and buy.stripe.com Payment Links need nothing: the script adds the referral to them itself. - Track signups. Safari and every browser on iPhone delete the referral cookie after 7 days. When a referred visitor signs up first and pays later, Arkvon credits the payment from their signup with the same email.
- Keep checkout working for visitors who didn't come through an affiliate.
- Report back: first anything you have to do outside your code, then the files it changed, and anything that could stop referrals from being tracked.
Look over the changes like any other code change, then deploy.
Already set up, or set up by hand? Click Copy check prompt instead: your assistant reviews the setup for anything that would lose referrals.
Prefer to do it by hand?
Switch to Manually for the same steps, with code for Node.js, Python, PHP and more. In short:
- Paste the tracking script into the
<head>of every page. If you run several campaigns, this one tag covers all of them. - When a customer starts checkout, send
window.arkvon_referralandwindow.arkvon_data?.trkto your server, and add them to the Checkout Session's metadata asaffiliateCodeandarkvon_trk, each only when it has a value. The token is signed by Arkvon, so a visitor who edits the referral cookie can't move the credit to another affiliate. - Pricing Tables, Buy Buttons and buy.stripe.com Payment Links need nothing. For Payment Links on your own domain, add the referral to the link as
client_reference_id. - Track signups (recommended): add the one-line queue snippet just before the script tag, then call
arkvon("signup", { email })after a signup succeeds. A plain HTML form can getdata-arkvon-track-forminstead.
Step 4: Run Test your setup
Under Test your setup, click Run live test. Arkvon opens your website in a new tab with a one-time test referral, then checks three things live while you click through:
- Your website. The tracking script runs, and on which pages.
- Checkout. Pick a plan and continue until you reach the Stripe payment page. Arkvon looks in your Stripe account for the checkout and checks the referral is on it. There's no need to pay.
- Signups. Sign up in the test tab with any email, and Arkvon checks the signup was tracked.
When your website and checkout pass, it says Tracking is live. When something's wrong, it says what to fix: the script never loaded (the tag isn't published yet, or a Content-Security-Policy blocks it), the tag has another campaign's ID, or a checkout was created without the referral. Test referrals never count as clicks, signups or sales, so run it as often as you like, and again after any change to your checkout.
Optional: one real purchase
Test your setup proves the referral reaches Stripe. To see a commission, a refund and the affiliate's side for yourself, do one real purchase too:
- Join your campaign as an affiliate with a second email address, or ask a friend, and copy the referral link.
- Open it in a private browser window and buy your cheapest plan.
- In Arkvon, check that the click, the sale and the commission appear. The affiliate sees the same numbers in their portal.
- Refund the payment in Stripe, and check that the commission is cancelled.
Stripe keeps its processing fee when you refund, so this costs a few cents.
What Arkvon tracks once it's set up
- Renewals. Each renewal earns a commission until the campaign's limit is reached, or forever on lifetime campaigns. On yearly plans, limits count months: with a 12-month limit, the affiliate earns on the first yearly payment in full; with a 3-month limit, on a quarter of it.
- Refunds. A full refund cancels the commission. A partial refund reduces it by the same share.
- Disputes. A disputed payment's commission is reversed. It's restored if you win the dispute.
- First touch. The first affiliate to refer a customer keeps them. A later payment with another affiliate's code doesn't move the customer.
- Safari and iPhone. When the browser has deleted the referral cookie, a payment is credited from the customer's tracked signup with the same email, within 30 days of the affiliate click.
- All your campaigns. One script tag covers every campaign you run, so affiliates from each of them are credited.
- Duplicates. Stripe sometimes sends the same event twice. Each payment is only counted once.
- Your program only. A referral code from another Arkvon program is ignored on your payments.
Once the holding period ends, commissions become payable and Arkvon generates your monthly payouts. Affiliates see their clicks, signups, sales and earnings in their own portal.
How the setup compares: Arkvon, Rewardful, Tolt, FirstPromoter and PartnerStack
Every Stripe affiliate tool asks for the same three things: connect Stripe, add a script, and get the referral onto the payment. The differences are in how the referral reaches Stripe, and what each tool needs from your checkout.
Here's what each tool's own setup guide asks for, as of November 2026:
| Tool | Connecting Stripe | Getting the referral onto the payment |
|---|---|---|
| Arkvon | Stripe App, read-only. No webhooks. | affiliateCode plus the signed arkvon_trk in Checkout metadata. The script adds the referral to Pricing Tables, Buy Buttons and Payment Links itself. |
| Rewardful | OAuth connection. | client_reference_id on Checkout, with customer_creation: 'always'. Payment Links need "Save payment details for future use" turned on. |
| Tolt | Stripe App, read-only except coupons and promotion codes. No webhooks. | tolt_referral in Checkout metadata. One-time payments also need customer_creation: 'always'. |
| FirstPromoter | Connected from its integration settings. | Send the customer's email or user ID to FirstPromoter when they sign up. Stripe payments are matched to it. |
| PartnerStack | Stripe webhook integration. | Send each sign-up to PartnerStack's API with a customer key. Stripe payments are matched to that customer. |
A few honest notes:
- Tolt's setup is the closest to Arkvon's. Both use a read-only Stripe App and a metadata field, and neither needs webhooks.
- FirstPromoter and PartnerStack work the other way round. Instead of putting the referral on the payment, you tell them who signed up, and they match that person's payments later.
- PartnerStack is built for bigger B2B partner programs, with resellers and referral partners as well as affiliates. Its main plans are priced on a demo call.
- Rewardful also publishes AI prompts, for sites built with Lovable and Base44.
- If you bill through Paddle or Chargebee, Arkvon isn't the right fit yet. Arkvon works with Stripe only. Tolt and FirstPromoter support other billing providers.
Where Arkvon makes it easier:
- One prompt does the code. Copy it into Cursor, Claude Code, Lovable, Bolt, Replit or ChatGPT, with your campaign ID and website already filled in. It covers Checkout, subscriptions, one-off payments and signups, and a second prompt checks an existing setup.
- A live test, without paying. Test your setup checks your real site and your Stripe account while you click through, and says what to fix.
- Setup done with you. Founding merchants get a 15-minute setup call, so you're not working through docs alone.
- Help finding affiliates. More on that below.
For feature-by-feature comparisons, see Arkvon vs Rewardful, Arkvon vs Tolt and Arkvon vs FirstPromoter.
Tracking is half the job: you still need affiliates
A perfectly tracked program with no affiliates earns nothing. Tracking tools give you the links and the numbers. Finding people to promote you is still up to you.
For our first 20 founding merchants, we help with that part too. We set up your program with you on a 15-minute call, then send you a researched shortlist of 15 to 20 potential affiliates for your SaaS within 24 hours, with why each could fit and where to start.
If you'd rather do it yourself, how to find affiliates for your SaaS business and how to launch an affiliate program with no affiliates walk you through it.
Common Stripe affiliate tracking mistakes
- The referral never reaches Stripe. The script keeps it in the browser, but your server creates the Checkout Session. Test your setup catches this: its checkout check fails.
- The script is missing on some pages. If a visitor lands on a page without it, the referral isn't saved. Add it to every page; Test your setup lists the pages it saw it on.
- The landing page lives somewhere else. If affiliate links send visitors to a Framer, Webflow, WordPress or Shopify site, the script has to go there too, or the referral is lost before the visitor reaches your app.
- A Content-Security-Policy blocks the script. Allow
https://cdn.jsdelivr.netin script-src andhttps://api.arkvon.comin connect-src. - Not tracking signups. Safari and iPhone delete the referral cookie after 7 days. Without a tracked signup, a customer who pays after that isn't credited.
- Connecting the wrong Stripe account. Connect the one your customers pay on.
- Creating subscriptions without the referral. A subscription you create with the Stripe API, for example behind your own payment form, needs the referral in its metadata as
affiliateCode, witharkvon_trknext to it. Without it, neither the first payment nor the renewals are credited. - Skipping the tests. Affiliates stay with programs whose numbers add up. Run Test your setup after every checkout change, and test one refund before an affiliate finds a problem for you.
Frequently asked questions
Does Stripe have built-in affiliate tracking?
No. Stripe processes payments, but it doesn't track referral links or pay affiliates. You need an affiliate tool connected to Stripe. Our Stripe affiliate program page explains how Arkvon fills that gap.
Can I track affiliate referrals with Stripe Payment Links?
Yes. The tracking script adds the referral to buy.stripe.com Payment Links on your pages as client_reference_id, and Arkvon reads it from there. No server code is needed. For Payment Links on your own domain, add client_reference_id to the link when it's clicked.
How do I test affiliate tracking without paying?
Run Test your setup on Arkvon's Integrations page. It opens your site with a test referral and checks, live, that the script runs, the referral reaches Stripe when you go to checkout, and signups are tracked. You don't need to pay, and test referrals never count as sales.
Does tracking work on Safari and iPhone?
Yes, if you track signups. Safari and every browser on iPhone delete the referral cookie after 7 days. When the customer signed up with the same email and pays within 30 days of clicking the affiliate's link, Arkvon credits the payment from that signup.
Do affiliates earn on subscription renewals?
Yes. Arkvon credits each renewal automatically, up to the limit you set on the campaign. That works for subscriptions started through Stripe Checkout or a Payment Link, and for ones you create with the Stripe API when the referral is in the subscription's metadata.
What happens when a referred customer gets a refund?
A full refund cancels the commission, and a partial refund reduces it. If the commission is still on hold, the affiliate is never paid for it. If it's already payable, it comes off what the affiliate is owed.
How long does an affiliate get credit after a click?
The referral is saved for 30 days after the click. Once a referred visitor pays, they stay with that affiliate for future payments.
Do I need a developer?
Not if you use an AI assistant. Paste Arkvon's setup prompt into Cursor, Claude Code, Lovable, Bolt, Replit or ChatGPT and it makes the changes, then Test your setup checks them on your live site. Without one, the manual setup is a few lines of code for a developer.
Key takeaways
- Stripe doesn't track affiliates. An affiliate tool connects the click, the customer and the payment.
- The referral has to be on the Stripe payment: in Checkout metadata, or as
client_reference_idon Payment Links. - With Arkvon: connect Stripe through the read-only app, paste one prompt into your AI coding tool, and test with a real purchase and refund.
- After that, renewals, refunds and disputes are handled automatically.
- Most Stripe affiliate tools set up in a similar way. Choose on fit, price and how much help you get finding affiliates.
Start tracking affiliate referrals on Stripe
Connect Stripe, paste one prompt and run a test purchase. Arkvon handles commissions, renewals, refunds and payouts from there.
See the founding merchant offer: $50 a year until your affiliates bring you $10,000 in sales, with setup on a call and a shortlist of potential affiliates within 24 hours.
