Skip to main content
The Stripe integration has two parts, and both are required:
  1. Authorize Stripe so Partnero receives the payments your customers make.
  2. Add referral tracking to your site so Partnero knows which partner referred each customer — from your sign-up flow, or from Stripe Payment Links.
Authorization on its own gives Partnero payments it cannot attribute to anyone. Step 2 is what creates the referred customer the payments attach to.
Your program’s own integration guide, with your program ID already filled in, lives in the app under Integration → Guides. It is the source of truth for the snippets below.

Step 1: Authorize Stripe

Authorizing lets Partnero see the payments your customers make, including renewals. You only need one of these.
Partnero is a verified Stripe partner.
  1. Log in to Stripe and open the Partnero app on the Stripe marketplace.
  2. Click Install from partner and confirm.
  3. Back in the Stripe dashboard, click Connect Program.
  4. Choose the Partnero program to connect.
  1. Go to Integration and scroll to Apps & Integrations.
  2. Click Authorize next to Stripe.
  3. Choose how to authorize:
    • OAuth — redirects to Stripe to grant Partnero access.
    • API key — paste the key from Developers → API keys in Stripe.
  4. Click Authorize.
Refer-a-friend programs get an extra option here to sync existing customers.
You do not configure Stripe webhooks yourself. Partnero subscribes to the events it needs when you authorize.

Step 2: Add referral tracking to your site

This is what tells Partnero which partner referred a customer. Without it, Stripe sends Partnero payments it cannot attribute to anyone. Pick the method that matches how your business takes payment.

Install the tracking script

Both methods start here. This snippet identifies visitors arriving through a partner’s referral link and stores the partner key in a first-party cookie. Copy your own snippet from the app — don’t retype the one below. It is generated per program and already contains your program ID:
  1. Open the program and go to Integration.
  2. Copy the PartneroJS snippet shown there. It also appears inside every guide on the Guides tab.
Paste it before the closing </head> tag on every page a referred visitor might land on — ideally site-wide. For reference, the snippet looks like this, where YOUR_PROGRAM_ID is filled in for you:

Then choose a method

In a refer-a-friend program the cookie is partnero_referral instead of partnero_partner, and the referrer is sent as referring_customer.key. The Payment Links script is identical.

What gets tracked

Once both steps are done, Partnero records one-off purchases, subscription renewals and any other charges your referred customers make, and reverses the commission automatically when a payment is refunded. Commissions are calculated on the amount after discounts and without tax. One-time purchases through Checkout or Payment Links also leave out shipping. Partial refunds reduce the commission proportionally. See What commissions are calculated on.

Attribution from your own backend

When a visitor arrives through a referral link, PartneroJS stores the partner key in a first-party cookie named partnero_partner (partnero_referral in a refer-a-friend program). That cookie is where the partner key comes from — read it on your server from the incoming request headers. If you create Stripe charges server-side, pass the key in Stripe metadata instead of relying on Partnero to match the customer:
  • partner_key — the value from the cookie. Attributes the sale to that partner even when no customer record exists yet.
  • customer_key — the same key you used when creating the customer in Partnero.
Partnero reads both from the checkout session, the charge, and the Stripe customer object. If your Stripe metadata already uses a different field name for the customer, map it instead of renaming your own field: open the Stripe integration in the app and set Stripe integration mapping.
The customer key must match the one you sent to Partnero. A mismatch means the sale is recorded against nobody.

Coupons

The Stripe integration can also sync coupons and promotion codes between Stripe and Partnero, so a partner’s discount code attributes the sale. See Create and use Stripe coupons.

Troubleshooting

Check step 2 actually ran. Open the customer in Partnero and confirm it exists and has a partner attached. A payment Partnero cannot tie to a customer is not attributed to anyone.
Partnero could not recognise the payer. Confirm the email used in Stripe is the same one you sent at sign-up — a different billing email is the usual cause. If you pass customer_key in metadata, compare it against the key in Partnero character for character.
Renewals arrive as invoice.payment_succeeded, which requires Stripe to be authorized (step 1). Creating the customer alone is not enough.

Next steps

Stripe coupons

Attribute sales from a partner’s discount code

Transactions API

Record transactions yourself