Attribution3 min read

How to track affiliate sales in Stripe (without custom code)

Stripe has no built-in affiliate tracking. Here is how to attribute Stripe Checkout and subscription payments to affiliates and referral partners using webhooks, how recurring commission and refunds work, and the mistakes that cause missing commissions.

Stripe is excellent at taking payments. It does not know which affiliate sent the customer. To pay partners commission on Stripe sales, you need something that records the partner's click and then matches the Stripe payment back to it.

The reliable way to do that is with Stripe webhooks: Stripe tells your tracking tool about each payment from its own servers, so nothing depends on the customer's browser.

How it works

  1. A partner shares their tracked link.
  2. A visitor clicks it. The click is recorded and given a click ID.
  3. The visitor pays through Stripe Checkout or your Stripe-powered checkout.
  4. Stripe sends a webhook event to your tracking tool.
  5. The tool matches the payment to the click and credits the partner.

Because step 4 comes from Stripe's servers, ad blockers and closed browser tabs cannot stop the sale from being recorded.

Which Stripe events matter

Stripe eventWhat it means for commission
checkout.session.completedA Checkout purchase finished. Credit the first sale.
invoice.paidA subscription invoice was paid. Credit recurring commission.
charge.refundedA payment was refunded. Reverse commission in full or in part.

Your tool should handle all three. Without the refund event, you keep paying commission on money you gave back.

If your Bridgly link points at a Stripe Payment Link (buy.stripe.com/…), there is nothing to install. Bridgly adds the click ID as Stripe's client_reference_id when someone clicks, Stripe returns it with the completed payment, and the partner is credited. A client_reference_id you set yourself is never overwritten.

Using your own checkout page instead? Pass the bridgly_click_id from the page URL into the Checkout Session as client_reference_id or as metadata.bridgly_click_id. Discount codes named after the partner (for example AVA10) credit the partner either way.

Setting it up

  1. Create your partner program and set a commission rule, cookie window, and hold period.
  2. Add the webhook in the Stripe dashboard under Developers, then Webhooks, pointing at the endpoint your tracking tool provides.
  3. Save the signing secret in your tracking tool, so it can verify each event really came from Stripe.
  4. Test end to end. Click a partner link, pay with a test card, and confirm the sale and commission appear against that partner.
  5. Refund the test payment and confirm the commission reverses.

Only invite partners after step 5 passes.

Recurring commission on subscriptions

Subscriptions are where Stripe affiliate tracking pays off. Each renewal is a new paid invoice, so a partner who brought in a customer can earn on every renewal.

Decide in your terms how long that lasts:

  • First payment only
  • A fixed period, such as 12 months
  • Lifetime, usually at a lower rate

Write it down before partners join. See affiliate commission rates by industry.

Common mistakes

  • Relying on a thank-you page pixel. Customers skip or block it. Use webhooks.
  • Not listening for refunds. Commission on refunded payments quietly adds up.
  • Paying immediately. Hold commission until your refund window passes.
  • Losing the click before checkout. Make sure the click ID reaches checkout, especially on mobile, where links open in in-app browsers.
  • Ignoring currency. If you sell in several currencies, report and pay commission per currency rather than adding them together.

How Bridgly connects to Stripe

Bridgly connects to Stripe with a webhook. Once it is connected:

  • Partner sales from Stripe Checkout and subscriptions are credited automatically.
  • Commission waits out your hold period, then becomes payable.
  • Refunds claw back commission automatically, proportionally for partial refunds.
  • You can pay partners directly through Bridgly, with payout details and tax forms collected from the partner.

Partner links can only be handed out once a sales source like Stripe is connected, so every link you share can actually earn.

The short version

  • Stripe does not track affiliates on its own; add a tool that listens to Stripe webhooks.
  • Handle checkout, paid invoices, and refunds.
  • Test a full purchase and a refund before inviting partners.
  • Decide how long recurring commission lasts and hold payouts until refunds clear.

Connect Stripe to Bridgly → · How affiliate tracking works

Frequently asked questions

Does Stripe have built-in affiliate tracking?
No. Stripe processes payments but does not know which partner sent a customer. Affiliate tracking needs a separate system that records partner clicks and then matches Stripe payments back to those clicks, usually through Stripe webhooks.
How do I connect affiliate tracking to Stripe?
Add a webhook endpoint in your Stripe dashboard that sends checkout and payment events to your affiliate tracking tool. When a payment completes, the tool receives the event server-side, matches it to the partner click, and credits the commission. No code on your checkout page is required.
Can affiliates earn recurring commission on Stripe subscriptions?
Yes. Each renewal produces a new Stripe payment event. If your affiliate tool listens for those events, it can credit commission on every renewal for as long as your program terms allow, such as 12 months or the lifetime of the subscription.
What happens to affiliate commission when a Stripe payment is refunded?
A well-built integration listens for Stripe refund events and reverses the commission automatically, in full for a full refund or proportionally for a partial refund. Holding commission until your refund window passes avoids paying out on sales that are later refunded.

Read more