Skip to main content

Verify Affiliate Tracking and Stripe Attribution

Test an affiliate link, confirm the generated referral ID reaches Stripe Checkout, and verify the resulting referral, sale, and commission.

Table of Contents

Use this checklist before sharing affiliate links. A script load or setup-test click proves only part of the path; complete the Stripe checkout test to verify sale and commission attribution.

During Setup step 4, the Run a test and Confirm tracking phases update automatically while the page is visible and resume when you return. The Integration status summary stays visible near the checklist and names the missing proof. Use Review developer steps when you need to inspect the integration directly.

The two setup states are intentionally different:

  • Configured — verification pending: AffiliateBase received the setup-test click, and Continue to next step is available. Stripe has not returned attribution proof yet.
  • Verified: Stripe returned the generated AffiliateBase referral ID on a completed Checkout Session.

1. Validate Referral Capture

  1. Open your site with ?via=TEST_TOKEN
  2. Confirm a call to /api/track succeeds
  3. Confirm window.AffiliateBase.referral is populated

2. Validate Checkout Attribution

Start a Stripe checkout and confirm client_reference_id is set to the generated AffiliateBase referral ID.

  • Payment Link: inspect the link after a referred visit and confirm client_reference_id was appended.
  • Buy Button or Pricing Table: inspect the Stripe element and confirm client-reference-id is set from the referral value.
  • Backend-created Checkout Session: confirm your server receives referral_id, sets client_reference_id, and mirrors the same value into affiliatebase_referral_id metadata.

If Stripe shows a client_reference_id beginning with ref_ or setup_, your checkout is sending the public affiliate link token instead of the generated referral ID.

3. Validate Conversion Creation

First check the mode shown beside your Stripe connection.

  • Connected — Test mode: complete a Stripe test purchase.
  • Connected — Live mode: do not create a live charge only to finish onboarding. Continue with verification pending, then verify the referral handoff and webhook delivery during an appropriate live payment.

For a same-mode payment, verify data appears in merchant dashboards:

  • Referrals
  • Sales
  • Commissions

4. Validate Affiliate Visibility

Log in as an affiliate (or impersonate) and confirm referral/commission visibility in the affiliate portal.

Troubleshooting

Use:

Next steps