Stripe has no built-in affiliate program feature. It charges the customer, but it does not create referral links, remember who sent a visitor, or calculate commissions. To run a Stripe affiliate program, you add a tracking layer that ties each Stripe payment back to the affiliate who earned it.

We checked this against Stripe's own documentation in October 2026. What Stripe gives you are building blocks: a client_reference_id field on Checkout, metadata on its objects, and webhook events for every paid invoice and refund. They are useful, and none of them is a commission system.

This guide shows how the pieces connect, event by event: the click, the checkout, every renewal and every refund. It also covers the five rules to decide before your first affiliate, and when building it yourself stops making sense.

Does Stripe have a built-in affiliate program feature?

No. As of October 2026, Stripe's documentation describes no feature that generates affiliate links, tracks referred visitors or computes commissions. Affiliate tracking on Stripe runs through third-party apps or your own code, built on fields Stripe designed for reconciliation, such as client_reference_id and metadata.

The closest native piece is client_reference_id. In the Checkout Session API, Stripe defines it as "a unique string to reference the Checkout Session," with a maximum length of 200 characters. On Payment Links, you can append it to the URL, and Stripe returns it in the checkout.session.completed webhook.

That gives you a place to carry an affiliate code into a payment. Everything else (the cookie, the attribution rule, the commission math, the reversal on refund) is yours to build or buy. The Stripe App Marketplace lists several affiliate apps for exactly this reason.

Looking for Stripe's own affiliate program instead?

Some searches for "stripe affiliate program" come from people who want to earn money by referring businesses to Stripe. That is a different program: Stripe pays marketing affiliates for qualified leads under its Affiliate Terms (last updated February 28, 2022), run through a third-party partner platform. This guide covers the other direction: paying your own affiliates for customers they send to your Stripe-billed product.

How does Stripe affiliate tracking work?

Stripe affiliate tracking connects three moments: the click, the checkout and every payment after it. The click stores the affiliate's code. The checkout carries that code into Stripe. Each later payment is matched to the same Stripe customer, so the commission follows the subscription instead of the browser.

In practice, it runs in five steps:

  1. The click. An affiliate shares a link like yoursite.com/?ref=jane. A script on your site reads ref and stores it in a first-party cookie for the length of your cookie window.
  2. The checkout. When the visitor buys, the code goes into Stripe: as client_reference_id on the Checkout Session or Payment Link, or as metadata on the customer or subscription.
  3. The mapping. When checkout.session.completed arrives, you record "Stripe customer cus_... belongs to Jane." From this point, the customer carries the attribution.
  4. The renewals. Every paid subscription period fires invoice.paid. You look up the customer, find Jane, and add a commission if the invoice is still inside your commission period.
  5. The refunds. A full or partial refund fires charge.refunded. You reverse or reduce the commission tied to that charge.

Cookies are a weak place to keep attribution. Since ITP 2.1, Safari caps every persistent cookie created through document.cookie at a seven-day expiry (WebKit, February 2019). A 30-day cookie window set by JavaScript can quietly become seven days for Safari visitors.

The fix is to move the code out of the browser as early as possible: into your signup record and into Stripe at checkout. Once Jane's code sits on the Stripe customer, a renewal in month eleven does not depend on any cookie still existing.

This is how each Stripe event should change the affiliate's balance (Stripe subscription webhooks):

Stripe eventWhat happenedCommission action
checkout.session.completedA referred visitor paid for the first timeSave customer-to-affiliate mapping, create first commission
invoice.paidA subscription period was paidAdd one recurring commission, if inside the commission period
invoice.payment_failedA renewal charge failedNo commission (no money came in)
charge.refundedFull or partial refund on a chargeReverse the commission, or reduce it by the refunded share
charge.dispute.createdThe customer disputed a chargeHold the commission until the dispute closes
customer.subscription.deletedThe subscription endedStop future commissions; nothing to reverse

What do you need to decide before the first affiliate?

Decide five rules before anyone promotes you: commission rate, commission duration, cookie window, refund rule and holding period. Put them in your affiliate terms on day one. Changing them after affiliates start sending traffic costs more trust than any rate change saves you.

DecisionYour optionsWhat it changes
Commission rate% of each payment, or a flat amount per saleYour margin on each referred customer
DurationOne-time, recurring for N months, recurring for lifeThe total you pay per customer
Cookie windowNumber of days between click and purchaseHow late a buyer can be and still count
Refund ruleFull reversal; partial reversal on partial refundWhether you pay commission on money you returned
Holding periodCommissions approved only after N daysWhether your refund window closes before payout

Here is the math on one example, with numbers chosen for illustration, not as a benchmark. A $49/month plan pays 20% recurring for 12 months. Each paid invoice earns $9.80, so the ceiling per customer is $117.60.

If the customer gets a refund on month three, that $9.80 reverses. If they cancel after month five, the affiliate earned $49.00 in total and nothing more is owed.

Run your own plan through the same arithmetic before you pick a rate. The step-by-step guide to starting an affiliate program covers the rest of the launch: terms, recruiting and what to measure.

How do recurring commissions and refunds work on Stripe subscriptions?

On a Stripe subscription, every billing period produces an invoice, and Stripe sends invoice.paid when it is paid. A recurring commission is one commission per paid invoice, for as long as your rules allow. A refund sends charge.refunded, and the commission tied to that charge should reverse with it.

Four cases trip up most homemade setups:

  • Upgrades and downgrades. Stripe fires customer.subscription.updated on plan changes. Calculate the commission on the amount of each paid invoice, not on the original plan price.
  • Failed payments. Pay commission on invoice.paid, never on invoice.created. An invoice that was created but never paid earns nothing.
  • Free trials. The checkout completes when the trial starts, so the mapping is saved before the first charge. The first commission arrives with the first paid invoice, even weeks later.
  • Partial refunds. If you refund half of a $49 invoice, reduce that period's commission by half. A full reversal on a partial refund shortchanges the affiliate.

Should you build Stripe affiliate tracking yourself or use a tool?

Build it yourself if you have one or two partners you already trust and an engineer with a free afternoon. The tracking is the easy part: a cookie script, client_reference_id and a webhook handler. Use a tool once strangers will promote you, because the work after tracking is where homemade programs break.

A working program needs more than attribution:

  • A signup page where affiliates apply, and a way to approve or reject them
  • A dashboard where each affiliate sees clicks, conversions and pending earnings
  • A commission ledger that handles reversals, partial refunds and holding periods
  • A monthly closing that records who was paid, how much and when

When a tool is overkill: if your whole program is one agency on a fixed referral fee, a spreadsheet and a Stripe coupon code are enough.

If you are comparing tools on cost, our breakdown of Tapfiliate alternatives runs the numbers at different sales volumes. And if you are still choosing between a customer referral program and an affiliate program, start with referral vs affiliate programs for SaaS.

How to set up a Stripe affiliate program in PartnerBee

PartnerBee connects to Stripe and tracks checkouts and subscriptions automatically, including recurring commissions and refunds. Affiliates get a link like yoursite.com/?ref=code; a short JavaScript snippet records the click and stores the referral in a first-party cookie (ba_aff), within the cookie window you choose for each program.

The setup follows the same five steps as the custom build:

  1. Create a program. Set the commission (one-time or recurring), the cookie window and the signup page. Choose auto-approval or review each application.

  2. Connect Stripe. In Integrations, PartnerBee gives you a webhook URL (https://api.partnerbee.app/webhooks/stripe/...). Add it as a webhook endpoint in your Stripe account and paste Stripe's signing secret (whsec_...) back into PartnerBee. PartnerBee verifies each event, reads the affiliate referral from the payment metadata and records the sale. It works with your existing Stripe account.

  3. Add the snippet to your site. Paste it on every page of your funnel, before </body>. bee('detect') reads ?ref= from the URL, registers the click and sets the ba_aff cookie:

    <script>
      (function(w,d,s,o){
        w.bee=w.bee||function(){(w.bee.q=w.bee.q||[]).push(arguments)};
        var j=d.createElement(s);j.async=true;
        j.src="https://script.partnerbee.app/beeaffiliate.js";
        d.head.appendChild(j);
      })(window,document,"script");
      bee('create', { integration: 'stripe' });
      bee('detect');
    </script>
    

    If your app lives on a different subdomain than your marketing site, forward ?ref= in the signup URL so the cookie can be set again there.

  4. Share the signup page. It is hosted at join.partnerbee.app, or on your own domain with white label.

  5. Approve and settle. Conversions arrive with the affiliate attached. You approve commissions and settle balances in one batch. The payment itself goes out through your own method; PartnerBee records the settlement and the monthly closing.

Not every sale goes through Stripe Checkout. For a custom checkout or a subscription you bill yourself, the REST API does the same job from your backend. Register the customer once at signup, attributed by the ba_aff cookie value, then report each charge by customer id. Renewals are credited to the original affiliate with no new click:

curl -X POST https://api.partnerbee.app/api/customers \
  -H "Authorization: beeaff-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "customer_id": "cus_123", "cookie_id": "<ba_aff value>", "status": "trial" }'

curl -X POST https://api.partnerbee.app/api/conversions \
  -H "Authorization: beeaff-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "customer_id": "cus_123", "external_id": "invoice_88", "amount": 49.90 }'

external_id makes each charge idempotent, so a retried webhook never counts twice. Once a customer passes the program's commission window, later charges stop generating commission. The full reference is in the PartnerBee developer docs.

Webhooks push conversions, approvals and payouts to your own systems as they happen. Stripe is not required: Asaas, Vindi, Guru, the API and the snippet work without it.

What it costs, as of October 2026: $6.99 per 30-day cycle, plus 2% of affiliate-tracked sales up to $10,000 per cycle (1.5% from $10,000 to $50,000, 1% above). The rate is 0% on the first $1,000 in affiliate-tracked sales, one time, and organic sales are never billed.

A first cycle with $3,000 in affiliate sales costs $6.99 + 2% of $2,000 = $46.99. The next $3,000 cycle costs $6.99 + $60 = $66.99.

FAQ

Yes. Append client_reference_id to the Payment Link URL and Stripe returns it in the checkout.session.completed webhook. The value accepts only letters, numbers, dashes and underscores, up to 200 characters. Stripe silently drops invalid values, so test with your real affiliate codes before launch.

Does Stripe calculate or pay affiliate commissions?

No. Stripe processes your customers' payments and sends events, but it has no commission logic. Your tracking tool or your own code turns invoice.paid and charge.refunded events into commission balances. Paying affiliates is a separate step that you run through your own payout method.

Do affiliates earn commission on Stripe subscription renewals?

Only if your program pays recurring commission. With recurring rules, each paid renewal invoice creates one commission until the period you set ends, such as 12 months. With one-time rules, only the first paid invoice counts. Failed or refunded renewals should earn nothing.

Match it to how long your buyers take to decide. Check the gap between first visit and paid signup in your own analytics, then set the window to cover most of it. Remember that Safari caps JavaScript cookies at seven days, so save the affiliate code at signup.

Stripe moves the money; your affiliate program needs the memory

A Stripe affiliate program works when the affiliate's code reaches the Stripe customer at checkout, every invoice.paid adds a commission inside your rules, and every charge.refunded takes one back. Decide your rate, duration, cookie window, refund rule and holding period before the first affiliate signs up.

PartnerBee does that wiring for you: native Stripe tracking for checkouts and subscriptions, recurring commissions that reverse on refund, and a monthly closing that records every settlement. It costs $6.99 per 30-day cycle plus a rate on affiliate-tracked sales only.

Start now: connect Stripe, set your commission and cookie window, and pay 0% on your first $1,000 in affiliate-tracked sales.


Vitor Rocha · October 7, 2026 · Reading time: 9 minutes

Published October 7, 2026