Insights · Affiliate Programs

Affiliate attribution for SaaS: links, promo codes, Stripe, and what breaks

How a partner's referral gets from a click to a paid Stripe invoice, where it gets lost on the way, and how to test each step.

TL;DR

Rewardful, FirstPromoter and Tolt all follow the same chain: a link parameter, a first-party cookie, a referral ID handed to Stripe, and a commission when an invoice is paid. The chain breaks in a handful of known places: ad blockers stopping the script, Safari shortening cookie lifetimes, a separate app domain, a checkout that drops the ID, and purchases made outside Stripe. Run links and Stripe promotion codes side by side, test both with a real payment, and read the dashboard as the minimum your partners drove.

How a referral gets from a click to a commission

A partner shares a link with a parameter on the end. Rewardful uses ?via=, FirstPromoter ?fpr= and Tolt ?ref=. The tracker's script on your site reads the parameter, creates a referral and stores it in a first-party cookie. When the visitor signs up or pays, your code passes that referral ID to Stripe. From then on the tracker listens to Stripe events, and each paid invoice for that customer creates a commission under the campaign rules.

The details of the handoff differ by platform, and they decide where you need to touch your own code.

PlatformLink parameterDefault cookieHow the referral reaches StripeClick rule
Rewardful?via=60 days, set per campaignReferral ID sent as client_reference_id on the Checkout Session, then kept in the customer's metadataFirst or last touch, your choice
FirstPromoter?fpr=60 days, adjustableRead from Stripe events; matching details sit behind a loginLast click by default
Tolt?ref=Up to 365 daystolt_referral in the Checkout Session or customer metadataFirst or last click, your choice

PartnerStack matches a payment to a partner through metadata.customer_key first, then the Stripe customer ID, then the customer's email. If you are still choosing a tool, our comparison of Rewardful, FirstPromoter, Tolt and PartnerStack covers price and fit by ARR.

Where attribution breaks

The script never loads

Every link-based setup depends on one script running on the landing page. Ad blockers often stop it. Rewardful's developer docs say that when the script is blocked, the code waiting for it never runs. Tolt's help center lists an ad blocker as one reason the referral comes back undefined. FirstPromoter documents the fix most teams end up using: serve the tracker through a first-party proxy on your own domain, with setups for Vercel, Cloudflare, Apache and NGINX.

The same failure shows up after a site rebuild. Tolt notes that a router which rewrites the URL before the script loads can strip the parameter. A redesign that moves the script below a client-side redirect produces the same result, and nobody notices until a partner asks why their numbers dropped.

Safari shortens the cookie

Since ITP 2.1 in February 2019, Safari caps persistent cookies set from JavaScript at 7 days. ITP 2.2 cut that to one day when the visitor arrives from a domain Safari classifies as a tracker and the landing URL carries a query string. Safari 14 extended the 7-day cap to cookies set through CNAME-cloaked subdomains. The window you set in your campaign can therefore be much shorter for a large share of your Mac and iPhone visitors.

Check in your tracker's docs how its cookie is set. A cookie written by your own server on your own domain is treated differently from one written by a script. For Safari users who decide slowly, the promo code is the more reliable path.

Safari Private Browsing also removes some tracking parameters from links before the page loads. WebKit says campaign parameters are allowed through but does not publish the list. Open a partner link in a private window and check that ?via= or ?ref= is still in the address bar when the page arrives.

Your app lives on another domain

Many SaaS teams run marketing on example.com and signup on app.example.com. Rewardful handles subdomains automatically, as long as the script is installed on both. Fully separate domains need an extra setting that appends the referral to outgoing links, and it is only on Rewardful's higher plans. Its help center lists the cases that still lose the referral: a visitor who types the app URL, a signup link sent by email, and a JavaScript or 301/302 redirect in between.

The checkout drops the ID

With Rewardful and Stripe Checkout, your server passes the referral ID as client_reference_id, which Stripe allows up to 200 characters. Stripe returns an error if the value is blank, so send it only when a referral exists. Set customer_creation to always, or Rewardful cannot tie the payment to a customer. Tolt asks for the same setting on one-time payments.

If you write the referral into Stripe metadata yourself, remember that Stripe does not copy metadata between objects. A value on the Checkout Session does not reach the subscription unless you also set subscription_data.metadata. Payment Links and invoices only carry a one-time snapshot.

The customer pays somewhere else

Sales-assisted deals closed on a manually sent invoice never pass through your checkout, so no referral travels with them. Decide in your terms whether partners earn on those deals and how you will record them.

App store purchases are a separate problem. Tolt added RevenueCat support in November 2026, so purchases, renewals and refunds in iOS and Android apps create and reverse commissions, and users can claim a partner code inside the app. FirstPromoter attributes installs through Branch, AppsFlyer or Adjust and takes sales from your backend through its API. We found no mobile documentation from Rewardful.

Money comes back after the commission

Rewardful recalculates the commission when Stripe reports a full or partial refund. FirstPromoter creates a negative commission and treats a new dispute the same way as a refund. Tolt marks the commission as refunded. Disputes arrive later than refunds: Stripe says card networks typically let cardholders dispute a payment within 120 days, sometimes longer. A hold period matched to your refund policy will not cover that, so write in your terms that disputed amounts are deducted from the next payout. Our affiliate program audit has the full check on hold periods and refunds.

Promo codes as the second track

A partner code works without a click or a cookie. The customer types it at checkout and the platform credits the partner. That makes codes the only option for podcasts, video and live talks, and a useful backup wherever links get lost.

In Stripe, a coupon defines the discount and a promotion code is the string customers type. One coupon can sit behind many codes, so each partner gets their own. Stripe Checkout only shows the code field when allow_promotion_codes is on, and a session accepts a single discount. Three restrictions are worth setting on every partner code: first-time customers only, a maximum number of redemptions, and an expiry date.

The platforms add their own rules:

Tolt can create the unique codes in Stripe for you.

None of these vendors' help pages covers codes that leak onto deal sites. Watch redemptions per code each month: a code used far beyond its partner's audience has usually been posted somewhere public.

When a link and a code point to different partners

It happens more than founders expect: someone clicks a comparison site's link, then hears a podcast host read a code a week later. Your tracker's click rule decides who is paid, and the defaults differ. FirstPromoter uses last click unless you change it. Rewardful lets you choose, and once a visitor converts they stay tied to that affiliate for good. Write your rule into the program terms in plain words, including what happens when a link and a code conflict, so partners can check it before they promote.

Test it the way partners will use it

Run these before you invite anyone and again after every change to the site or checkout. Tolt's Stripe integration can't be tested in Stripe test mode, so plan on live payments with a near-total discount, as described in our 14-day launch plan.

TestWhat a pass looks like
Partner link in Chrome, signup, real paymentReferral and commission appear for the right partner
Same link with an ad blocker onStill tracked (proxy works) or you know the gap and rely on codes
Link opened in Safari, cookie inspected in dev toolsExpiry date matches what you promise partners, or the terms say otherwise
Link opened in a Safari private windowThe parameter is still in the URL when the page loads
Link on the marketing site, signup on the app domainReferral survives the move
Code only, in another browser, no link clickedDiscount applied and the partner credited
Link from partner A, then code from partner BCredit follows the rule in your terms
Full refund on a test paymentCommission reversed or set to zero

Read the dashboard as a floor

Even a clean setup misses some customers: a phone link that ends in a desktop purchase, a cookie cleared between visits, a code forgotten at checkout. Add a "How did you hear about us?" question to signup and compare the answers with tracked referrals each month. When a partner shows up often in the answers and rarely in the tracker, check their links and code before you conclude the partnership isn't working. Pay commissions on tracked sales only, and use the self-reported answers to find setups that need fixing.

How Enclaverse can help. We run affiliate and creator programs for B2B and prosumer SaaS, and we verify tracking end to end by day 3-4, before any partner is contacted. See the Affiliate & Creator Program page, or book a call to go through your setup.

FAQ

How does affiliate tracking work with Stripe?

The affiliate platform links a visitor to a partner through a link or a promo code, then passes a referral ID into Stripe at checkout, usually in the Checkout Session or the customer's metadata. Stripe reports each paid invoice to the platform, which creates the commission.

Why is my affiliate link not tracking?

The usual causes are an ad blocker stopping the tracking script, a redirect or router that strips the URL parameter, a signup on a different domain without the script, or a checkout that never passes the referral ID to Stripe. Test each one with a real payment.

Can a promo code replace an affiliate link?

For many partners, yes. A unique Stripe promotion code credits the partner at checkout with no click or cookie, which suits podcasts, video and mobile readers. Most programs give partners both and write a rule for when they point to different people.

Should SaaS affiliate attribution be first click or last click?

Either works if it is written in your terms and set the same way in your tracker. First click rewards the partner who introduced you; last click rewards the one who closed the decision. Changing the rule later upsets partners, so pick one before launch.

Sources, all checked on 23 November 2026: Rewardful, JavaScript API overview, Rewardful, How long are referral cookies valid (9 October 2024), Rewardful, Campaign settings overview (21 March 2026), Rewardful, Integration using Stripe server-side Checkout (13 April 2026), Rewardful, How does Rewardful use my Stripe account (16 July 2026), Rewardful, Tracking across domains (23 July 2023), Rewardful, Promotion codes for referral tracking (8 July 2026), FirstPromoter, How it works, FirstPromoter, Campaign setup, FirstPromoter, Stripe billing integration, FirstPromoter, Tracking sales with coupon codes (5 June 2026), FirstPromoter, How payouts work (20 October 2026), FirstPromoter, Proxy setup, FirstPromoter, Mobile attribution providers, Tolt, What to do if tolt_referral is null, Tolt, Set up Stripe with Tolt, Tolt, Unique coupon codes for partners (22 October 2026), Tolt, Commission statuses (22 October 2026), Tolt, Changelog (entries of 1 and 4 November 2026), PartnerStack, Stripe payment tracking (20 August 2026), Stripe, Create a Checkout Session, Stripe, Metadata, Stripe, Coupons and promotion codes, Stripe, How disputes work, WebKit, ITP 2.1 (21 February 2019), WebKit, ITP 2.2 (24 April 2019), WebKit, CNAME cloaking and web privacy (12 November 2020), WebKit, Private Browsing 2.0 (16 July 2024).

Where this leads

Want this run on your program?

Thirty minutes, your real numbers, no pitch deck.

BOOK A STRATEGY CALL →

gabriele.soprano@enclaverse.com · +45 50 38 44 15

BOOK A CALL