Know what must work before you launch
Connect browser referral capture to a server-side Stripe checkout
- Best fit
- Teams evaluating AffiliateBase for a Svelte affiliate workflow.
- Checkout handoff
- The checkout path must receive the generated AffiliateBase referral ID.
- Proof required
- Complete one referred checkout and confirm the attributed sale and commission.
Follow the attribution evidence
Illustrative scenario · fictional values
-
Referred visit
?via=partner
AffiliateBase captures the visit and generates a referral record.
-
Checkout handoff
referral ID
The checkout must carry the generated identifier into Stripe.
-
Paid event
$99 paid
A supported Stripe event confirms the attributed payment.
-
Commission
$19.80 due
An eligible attributed sale creates the commission record.
-
Payout prep
Payout ready
Review the commission and prepare the next step with your payout provider.
This guide is for merchants running an affiliate program in their own Svelte or SvelteKit app. A plain Svelte site can load the script in its HTML shell; SvelteKit projects can use app.html or an appropriate layout.
The generated referral ID exists in the browser. Submit it to the SvelteKit server route or form action that creates Stripe Checkout. A store can hold client state, but it does not attribute a payment by itself.
Use the Stripe checkout requirements and complete the verification checklist on a reachable deployment.
Connect the app shell, checkout request, and Stripe event:
Choose the Checkout Route
Install the Browser Script
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>
Pass Referral State Server-Side
Test the Published Flow
Confirm the Commission
What the SvelteKit Path Provides
Small Client Boundary
Only referral capture and checkout initiation need browser state.
Protected Checkout Creation
Stripe secret-key work remains in a server route or action.
Full-Path Verification
The test follows the buyer from affiliate link through commission creation.
SvelteKit Affiliate Tracking Questions
Does a Svelte store create attribution?
Can server code read the browser global?
How should I test?
Related Platform Guides
Add an Affiliate Program to Next.js
Install affiliate tracking in Next.js, hand the generated referral ID to a server-created Stripe Checkout Session, and verify attribution.
Add an Affiliate Program to Nuxt
Load affiliate tracking in Nuxt, pass the generated referral ID to a server route, and verify a Stripe sale and commission.
Create an Affiliate Program with WordPress
Install AffiliateBase on WordPress, choose a supported Stripe checkout, and verify referral attribution without assuming WooCommerce or plugin compatibility.
Create an Affiliate Program with Webflow
Add affiliate tracking to a published Webflow site, pair it with a supported Stripe checkout, and verify referral attribution before launch.
Add Affiliate Tracking to a React Checkout
Capture affiliate referrals in a React app, send the generated referral ID to your checkout backend, and verify Stripe attribution.
Verify Your SvelteKit Checkout
Test the same client and server path your customers use.