Payment Links and pricing tables
Stripe Payment Links, buy buttons and pricing tables need only the tracking script.
Stripe Payment Links, buy buttons and pricing tables earn commissions with nothing more than the tracking script. There is no code to change.
How it works
Stripe builds these checkouts without your server, so there is no metadata to set. Instead, the tracking script writes the visitor's referral into each one's client reference, as supaffi_<token>. Stripe passes it on with the sale.
<a href="https://buy.stripe.com/test_abc123">Buy now</a><a href="https://buy.stripe.com/test_abc123?client_reference_id=supaffi_<token>">Buy now</a>Put the tracking script on every page that shows a Payment Link, buy button or pricing table, not only on the pages affiliate links land on. The script reads the referral cookie on each page and tags what it finds.
What gets tagged
- Elements added after the page loads are tagged too, so single-page apps work.
- The script checks again on each click and when the tab comes back into view, so a newer affiliate click from another tab takes over. Last click wins.
- An empty client reference is filled in. One that already starts with
supaffi_is updated.
What is not supported
- Payment Links on your own custom checkout domain. Only links to
buy.stripe.comare tagged. - Links, buy buttons and pricing tables that already carry a client reference of your own. The script never overwrites it, so those sales are not tracked.
- On the page the affiliate link opens, a buy link clicked in the split second before the click is recorded goes out untagged.
If you create Checkout Sessions on your server as well, add the referral there too. See Checkout Sessions.
Several products on one Stripe account
Products can share a Stripe account. When they do, never show one product's Payment Links, buy buttons or pricing tables on another product's site. A sale there could be credited to the other product's affiliate.