Connect Stripe so Tolt can track the customers your partners refer and the payments they make. You connect your Stripe account, add Tolt's tracking script to your site, and send each customer's referral ID to Stripe.
This guide covers Stripe Checkout sessions and the Subscriptions API. For Payment Links, Pricing Tables or Buy Buttons, see the guides under Good to know.
Add the integration
Go to Settings › Integrations and click Add integration.
Select Stripe and click Continue with Stripe.
Open the tab that matches how you take payments: Checkout session or Subscription API.
Under Connect your Stripe account, click Install the Tolt app and follow the steps in Stripe.
Add the tracking script
Copy the script from Add the Tolt tracking script to your site and paste it into your website's <head> tag. It already includes your data-tolt ID:
<script async src="https://files.tlt-cdn.com/tlt.js" data-tolt="YOUR-DATA-TOLT-ID"></script>
Add it to every page, including your landing pages and app pages, so no visit through a partner link is missed. The script is about 4 KB. If you use Google Tag Manager, copy the version from the Google Tag Manager tab instead.
Send the referral ID to Stripe
The script stores the visitor's referral ID in window.tolt_referral. Send it from your front end to your server, then add it as tolt_referral in the metadata when you create the checkout session or subscription.
This JavaScript example adds it to a Checkout session:
const session = await stripe.checkout.sessions.create({
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
metadata: {
tolt_referral: req.body.referral,
},
line_items: [
{price: 'price_123', quantity: 1},
],
mode: 'subscription',
});
This JavaScript example adds it to a subscription:
const subscription = await stripe.subscriptions.create({
customer: 'cus_123',
metadata: {
tolt_referral: req.body.referral,
},
items: [
{price: 'price_123'},
],
});
It works the same in any language. If you call the Stripe API from the client side, use window.tolt_referral directly.
Save the integration
Optionally, under Extra, switch on Exclude Stripe tax in the tracking amount to calculate commissions without tax.
Click Save integration.
Tolt now tracks payments, cancellations and downgrades from the customers your partners refer.
Good to know
For developers: the Stripe integration guide in Tolt's API docs has more code examples and explains how Tolt matches payments to partners.
To record customers when they sign up, before they pay, see Track sign-ups as leads.
To check that everything works, see Test the integration.
Using other Stripe tools? See Set up Stripe Payment Links with Tolt, Set up Stripe Pricing Tables with Tolt or Set up Stripe Buy Button with Tolt.
Need a hand? Contact us via chat and we'll set up Stripe with you.


