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-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 Pricing Tables in your website's body tag:
<script>
const updatePricingTables = () => {
var stripePricingTables = document.querySelectorAll("stripe-pricing-table");
if (window.tolt_referral !== null && stripePricingTables.length > 0) {
stripePricingTables.forEach(stripePricingTable => {
stripePricingTable.setAttribute("client-reference-id", window.tolt_referral);
})
}
}setTimeout(updatePricingTables, 1000);
setTimeout(updatePricingTables, 2200);
setTimeout(updatePricingTables, 3200);window.addEventListener("tolt_referral_ready", () => {
if (window.tolt_referral) {
updatePricingTables()
}
})
</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.