Payment Links
0% transaction fees
From $19.99/mo

Affiliate Tracking
for Stripe Payment Links

Sell with Stripe Payment Links and still credit the right affiliate. One script on your site adds the affiliate to every buy.stripe.com link, and discount codes cover the links affiliates share on their own.

Connect StripeINTEGRATIONS
Stripe account
Set up with StripeDone
How do your customers pay?
Payment Links, pricing table or buy button
Links we detect
buy.stripe.com
Last sale received 2 minutes ago
The short answer

Can you track affiliates on Stripe Payment Links?

Yes, when the customer reaches the Payment Link from your site. The LinkJolt script on your page adds the affiliate to the buy.stripe.com link as client_reference_id, Stripe carries it onto the Checkout session, and LinkJolt credits the completed payment to that affiliate. A Payment Link opened on its own carries no affiliate; a discount code covers that case.

Creating Checkout sessions in your own code instead? The Stripe integration covers that path, and coupon tracking explains codes in depth.

What you get

Link tracking without checkout code, codes for everything a link cannot reach, and payouts that never pass through LinkJolt.

Every buy.stripe.com link carries the affiliate

On a page that loads the LinkJolt script, each Payment Link gets the affiliate added as client_reference_id, including links your page adds later. A link that already sets its own client_reference_id is left alone.

Recorded from the payment Stripe confirms

Stripe copies the reference onto the Checkout session, and the sale is recorded from checkout.session.completed, server-side. A closed tab or a blocked thank-you page cannot lose a sale Stripe has confirmed.

Discount codes for links shared on their own

A Payment Link opened from an email, a post or a QR code carries no affiliate. Allow promotion codes on the link and give those affiliates a code: a sale using it is credited to them.

Subscriptions and renewals

A Payment Link that starts a subscription is tracked like any Checkout subscription: renewals can pay the referring affiliate a recurring commission, capped by months or payments if you choose, on the Professional plan and above.

Refunds reverse the commission

A refund in Stripe reverses the commission, in proportion for a partial refund, and cancels any payout still queued for it. A test-mode purchase is recorded as a test sale and never paid.

A portal for your affiliates

Partners get their own branded dashboard with links, codes, live earnings and payout setup, included on every plan.

Setup

Four steps, about five minutes

The same steps the Stripe tab in the Integration Hub walks you through after you sign up, with your real merchant ID filled in.

Connecting Stripe is what sends your sales to LinkJolt. The script only decides which affiliate a Payment Link sale belongs to, so it has to run on the page the customer clicks the link from.

Watch how it is done

Affiliate Tracking for Stripe Payment Links, Pricing Table and Buy Button (1:40)

Plumquote is a demo account made for this tutorial.

Watch on YouTube
Read the transcript

Connect Stripe and add the script 0:00

If your site sells through Stripe Payment Links, the pricing table or the buy button, affiliate tracking takes one line of code. Here's the whole setup.

In LinkJolt, open Integrations. On the Stripe tab, connect Stripe first: one approval on Stripe's site, and your sales reach LinkJolt on their own.

Then, under How do your customers pay, pick Payment Links, pricing table or buy button. No code.

Step three is one line for your site's head. Copy it, and paste it on every page that has a buy button.

It covers links to buy.stripe.com, Stripe's pricing table, and the buy button.

What the script does on your page 0:39

Now someone arrives through an affiliate's link. The script remembers that affiliate for thirty days.

And it adds them to every Stripe Payment Link on the page, as the client_reference_id. Hover the button, and you can see it on the end of the link.

On the pricing table and the buy button, it sets the client-reference-id attribute instead, and Stripe passes it to the checkout they open.

If you've set a client_reference_id yourself, the script leaves it alone.

The sale arrives 1:07

The customer pays on Stripe as usual, and the sale arrives in LinkJolt, credited to the affiliate.

Here it is: a fifteen dollar subscription, and three dollars of commission for Leo, waiting for your approval.

One catch: a link shared on its own 1:20

One catch. A Payment Link shared on its own, with no page of yours around it, has nowhere for the script to run. Give those affiliates a discount code instead.

That's the setup. Try LinkJolt free for seven days at linkjolt.io.

1

Connect Stripe

Sign up, create a campaign, open Integrations and choose Stripe. Set up with Stripe is one approval on Stripe's site; the Stripe App Marketplace app or a webhook you add yourself work too.

2

Answer: Payment Links, pricing table or buy button

The Stripe tab asks how your customers pay. Choose Payment Links, pricing table or buy button and it shows only the steps for them: no checkout code.

3

Add the tracking script

One line in the head of every page that holds a Payment Link, a pricing table or a buy button. It adds the affiliate to each of them on the page.

4

Check it works

Open your site with the tab's test link, click a Payment Link, and make a test-mode purchase. It lands under Test sales on Commissions.

Step 3: the tracking script

<script src="https://www.linkjolt.io/api/tracking.js?id=YOUR_MERCHANT_ID"></script>

After a visit through an affiliate link, every link to buy.stripe.com on the page reads like this when the customer clicks it:

https://buy.stripe.com/your-link?client_reference_id=tc_CAMPAIGN_aff_AFFILIATE_cid_CLICK

The affiliate is remembered for 30 days, so a customer who comes back later and buys from any page of your site that loads the script is still credited.

Where the customer opens the link

  • Your page, then the linkattributed: the script adds the affiliate before the customer clicks
  • The link on its ownnot attributed by link (email, social post, QR code); an affiliate code still credits the sale
  • Your own domainnot rewritten: the script matches buy.stripe.com only
  • Stripe's pricing table or buy buttonattributed: the script sets its client-reference-id, unless you set one yourself

Adding the webhook yourself?

With Set up with Stripe or the Stripe App Marketplace app there is nothing to add. A webhook endpoint you create yourself needs these events: checkout.session.completed, charge.refunded, charge.dispute.created, charge.dispute.funds_withdrawn, charge.dispute.funds_reinstated, charge.dispute.closed, invoice.payment_succeeded, customer.subscription.updated, customer.subscription.deleted.

FAQ

Stripe Payment Links affiliate tracking FAQs

What merchants selling through Payment Links ask before setting a program up

Can LinkJolt track affiliate sales from Stripe Payment Links?

Yes. Put the LinkJolt tracking script on the pages that hold your Payment Links. When a visitor arrives through an affiliate link, the script adds the affiliate to every buy.stripe.com link on the page as client_reference_id, Stripe copies it onto the Checkout session, and the completed payment is credited to that affiliate. There is no checkout code to write.

What if an affiliate shares my Payment Link directly?

Then the link cannot carry the affiliate. A Payment Link opened from an email, a social post or a QR code never passes through a page with the script, so Stripe receives no client_reference_id and the sale is not attributed by link. Give those affiliates a discount code instead: a sale that uses an affiliate's code is credited to them wherever the link was opened.

Do discount codes work with Payment Links?

Yes, when the Payment Link allows promotion codes. Turn on the option to allow promotion codes on the link in Stripe, then register each affiliate's code in LinkJolt, or let LinkJolt create the code in your Stripe account if you connected with Set up with Stripe. A sale with no affiliate in its client_reference_id is matched by the code the customer entered.

Does it work for subscriptions sold through a Payment Link?

Yes. A Payment Link opens a Stripe Checkout session like any other, so the first payment is recorded from checkout.session.completed and each renewal from the subscription's invoices. Recurring commission on renewals, with a cap by months or by payments if you want one, is available on the Professional plan and above. A refund reverses the commission.

Does it work with Stripe's pricing table or buy button?

Yes. On a page that loads the script, it sets the client-reference-id attribute on Stripe's embedded pricing table and buy button, and Stripe copies it onto the Checkout session as client_reference_id, the same field a Payment Link fills. If you already set client-reference-id yourself, the script leaves your value alone; credit those sales with an affiliate's discount code instead.

Does the script handle a Payment Link on my own domain?

Yes, once the script tag names that domain. If Stripe serves your Payment Links on a subdomain of yours, such as pay.yourbrand.com, enter it in the Stripe tab of the Integration Hub and paste the script tag it gives you: the script then adds the affiliate to every link on that domain, as it does on buy.stripe.com. Without it, links on your own domain carry no affiliate from the script.

How do I check it works?

Open your site with the test link the Stripe tab in the Integration Hub gives you, click a Payment Link and look at the address: it should contain client_reference_id=tc_ followed by the rest of the reference. A purchase made in Stripe test mode is recorded as a test sale, listed under Test sales on the Commissions page apart from your live commissions, and refunding it afterwards reverses the commission.

Works with Stripe Payment Links

Track your Payment Link sales

From $19.99 a month with 0% transaction fees on every plan.

7-Day Free Trial

0% Platform Fees

Cancel Anytime

LIVE

🇺🇸

4

🇬🇧

2

🇩🇪

2

10+

SaaS companies joined this week