Stripe integration
How to set up affiliate & referral programs with Stripe
Stripe takes the payment. ReferBeam works out who sent the customer, calculates the recurring commission from each paid invoice, reverses it on refunds, and pays your partners automatically.
How it works with Stripe
Time to launch: most teams finish the 4 steps below in an afternoon. Updated December 2, 2026. This page covers how to setup affiliate and referral programs with Stripe, the setup for referral program software and affiliate programs alike.
- 1
Add the tracking script
One script tag on your site records partner clicks and stores a visitor ID in a first-party cookie.
- 2
Connect Stripe
Paste a restricted Stripe key. It is encrypted at rest, and ReferBeam adds one webhook to your Stripe account (and removes it if you disconnect).
- 3
Pass the visitor ID to Checkout
Send the visitor ID as client_reference_id (or as metadata) when you create the Checkout Session, so ReferBeam can credit the partner.
- 4
Watch commissions appear
Each paid invoice becomes a commission under your rules. Refunds reverse them automatically.
What ReferBeam tracks from Stripe
- checkout.session.completed: links the Stripe customer to the partner who sent them
- invoice.paid: a payment, counted net of tax, inside your recurring commission window
- refund.created: a negative conversion that reverses the commission, with the tax share removed
- customer.subscription events: customer status only, they never change commissions
- Partner promotion codes: credit a partner even when the customer never clicked a link
Credit the partner when you create the Checkout Session
const session = await stripe.checkout.sessions.create({
mode: "subscription",
line_items: [{ price: PRICE_ID, quantity: 1 }],
client_reference_id: visitorId, // from window.ReferBeam.visitorId()
success_url, cancel_url,
});Recurring commissions
Fraud checked before payday
One approval pays everyone
Questions about Stripe
Does Stripe have its own affiliate program or partner payouts?
Stripe processes payments, but it does not include affiliate tracking, commission rules or partner payouts in its dashboard. A tool like ReferBeam sits on top of Stripe to do that.
Can I pay recurring commissions on Stripe subscriptions?
Yes. Set a recurring window (for example 12 months, or lifetime) and every paid invoice inside it earns a commission. Upgrades, downgrades and refunds adjust automatically.
What access does ReferBeam need to my Stripe account?
A restricted key with the specific read permissions the app lists, plus permission to add and remove its own webhook. It is encrypted at rest and you can disconnect at any time.
What if a customer pays without clicking a partner link?
If they use a partner's promotion code, the partner is still credited. Customers who found you on their own are never counted.