Payment Links
For sites using Stripe Payment Links, Pricing Tables, or Buy Buttons.
When to Use This
Use this method if you:
Use Stripe Payment Links
Embed Stripe Pricing Tables
Use Stripe Buy Buttons
Build with no-code tools (Webflow, Framer, Carrd, etc.)
Step 1: Add the Scripts
Add this to all pages of your website, before the closing </body> tag:
<!-- PromoteBoost Tracker -->
<script src="https://api.promoteboost.com/tracker.js" data-org="YOUR_ORG_ID"></script>
<!-- Payment Links Attribution -->
<script>
document.addEventListener("DOMContentLoaded", function () {
setTimeout(function () {
const referralId = window.promoteboost_referral;
if (!referralId) return;
// Stripe Payment Links
document.querySelectorAll('a[href^="https://buy.stripe.com/"]').forEach(function (link) {
if (!link.href.includes("client_reference_id")) {
const separator = link.href.includes("?") ? "&" : "?";
link.href += separator + "client_reference_id=" + referralId;
}
});
// Stripe Pricing Tables
document.querySelectorAll("stripe-pricing-table").forEach(function (element) {
element.setAttribute("client-reference-id", referralId);
});
// Stripe Buy Buttons
document.querySelectorAll("stripe-buy-button").forEach(function (element) {
element.setAttribute("client-reference-id", referralId);
});
}, 1500);
});
</script>Find your Org ID in Settings → Integration.
Step 2: That's It!
The script automatically:
Detects when a visitor came from an affiliate link
Finds all Stripe payment elements on the page
Adds the referral ID to each element
Stripe includes it in the purchase
Why the 1500ms Delay?
Some website builders (Webflow, Framer, etc.) load Stripe elements dynamically. The delay ensures the script runs after everything is loaded.
If your elements load faster, you can reduce it:
Platform-Specific Instructions
Webflow
Go to Project Settings → Custom Code
Paste the script in the Footer Code section
Publish your site
Framer
Go to Site Settings → General → Custom Code
Paste in the End of
<body>tag sectionPublish
Carrd
Go to your page settings
Add an Embed element
Choose Code and paste the script
Set position to Footer
Squarespace
Go to Settings → Advanced → Code Injection
Paste in the Footer section
Save
Testing
Add
?ref=test123to your URLOpen DevTools → Console
Check:
console.log(window.promoteboost_referral)Inspect your Payment Link — it should have
client_reference_idin the URL
Troubleshooting
Referral not added
Check if tracker.js is loading (Network tab)
Elements not found
Increase the setTimeout delay
Wrong affiliate credited
Clear cookies and test again
Done!
Sales from Payment Links are now tracked. Affiliates will see commissions in their portal.
Last updated