Skip to main content
All CollectionsIntegrationsStripe
How to set up Stripe Payment Links with Tolt
How to set up Stripe Payment Links with Tolt

Easily set up Tolt with your Stripe account and SaaS in under 15 minutes!

Damjan avatar
Written by Damjan
Updated over a month ago

To integrate your SaaS and Stripe with Tolt, begin by following these steps:

Head over to the Tolt dashboard and navigate to Program Settings > Integration.


Here, you'll find the initial step to connect with Stripe.

Then, you'll need to insert our script in your website's head tag:

<script async src="https://cdn.tolt.io/tolt.js" data-tolt="YOUR-TOLT-PUBLIC-ID"></script>

You can find your unique public ID and the full script tag in Account Settings -> Integrations, please navigate there to copy it. The script needs to be added on your landing page, or even better, on every page, so we never miss a referral. This script will add a global variable called "tolt" to your window object. The size of the script is around 4KB.

You can skip the other steps in the Integration page, as they won't be needed.

The last step of the integration, adding the script for the Payment Links in your website's body tag:

<script>
function updateButtonUrls() {
var buttons = document.querySelectorAll('a[href^="https://buy.stripe.com"]');
if (window.tolt_referral) {
for (var i = 0; i < buttons.length; i++) {
var btn = buttons[i];
if (btn.href.indexOf("client_reference_id") === -1) {
btn.href = btn.href + '?client_reference_id=' + window.tolt_referral;
}
}
}
}
setTimeout(updateButtonUrls, 1000);
setTimeout(updateButtonUrls, 1900);
setTimeout(updateButtonUrls, 2600);

window.addEventListener("tolt_referral_ready", function() {
if (window.tolt_referral) {
updateButtonUrls();
}
});
</script>


That's it! Your affiliate links should now work.



To test out the integration:
1.
Create a demo affiliate through your affiliate portal and copy your link
2. Open your affiliate link
3. Make a test purchase on your website

BONUS: You can create a 100% off coupon on Stripe and use that code to make the test purchase, so you do not get charged.

You can always contact us via live chat and we can set up Stripe together!

Did this answer your question?