Overview

Choose how to track affiliate sales with Stripe.


Choose Your Method

Method
Difficulty
Best For

Easy

No-code sites, Webflow, Framer

Medium

Custom backends with Checkout

Medium

API-first integrations

Very Easy

Any setup, no code needed

Not sure? Start with Coupon Codes — works everywhere with zero code.


How Tracking Works

  1. Click — Visitor clicks affiliate link (yoursite.com?ref=CODE)

  2. Cookie — Referral is stored in a cookie (30 days default)

  3. Purchase — Visitor buys via Stripe

  4. Webhook — Stripe sends payment event to PromoteBoost

  5. Attribution — Sale is matched to the affiliate

  6. Commission — Amount is calculated and recorded


Attribution Priority

When multiple affiliates could get credit, this order decides:

Priority
Method
Example

1st

Coupon Code

Customer used JOHN20

2nd

Metadata

promoteboost_referral in Checkout

3rd

Cookie

Last click from ?ref=john

Coupon codes always win — even if the customer clicked a different affiliate's link.


Install the Tracking Script

For most methods, add this to all pages:

What it does:

  • Captures ?ref=CODE from the URL

  • Stores referral in a first-party cookie

  • Makes window.promoteboost_referral available to your code

Find your Org ID: Settings → Integration


Testing Your Integration

1. Create a Test Affiliate

Go to Affiliates → Create and add a test affiliate with code test123.

Visit your site with the referral parameter:

Open browser DevTools → Console:

4. Make a Test Purchase

Use Stripe test mode with card 4242 4242 4242 4242.

5. Verify in Dashboard

Go to Conversions — you should see a new pending conversion attributed to your test affiliate.


Troubleshooting

Problem
Solution

promoteboost_referral is undefined

Check if tracker.js is loaded (Network tab)

Cookie not set

Make sure you're on HTTPS

Sale not tracked

Check Stripe webhook logs

Wrong affiliate credited

Check attribution priority above

→ See FAQ for more help.

Last updated