Know what must work before you launch
Use web forms and actions to carry referral state into Stripe Checkout
- Best fit
- Teams evaluating AffiliateBase for a Remix 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 building a program into their own Remix application. The affiliate click starts in the browser; the Stripe Checkout Session belongs in server code.
Load AffiliateBase in the root document, then include the generated referral ID in the form or fetch request handled by your checkout action. Do not send the public ?via token or expect a loader to read browser state.
Follow the Stripe handoff guide, then prove the same route with AffiliateBase’s verification checklist.
Build one explicit browser-to-action path:
Map the Checkout Action
Identify the browser form or button and the Remix action or resource route that creates Stripe Checkout.
Load the Browser Script
Place the account-specific script in the root document so affiliate landing and pricing routes both capture the referral.
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>Submit the Generated Referral ID
Include the generated UUID as a form field or JSON value, validate it in the action, and set Stripe client_reference_id plus the documented metadata mirror.
Run a Deployed Test
Open the generated test link, submit through the production-shaped action, and complete Stripe test checkout.
Verify the Result
Confirm the referral, completed checkout, sale, and commission. Test renewals separately if recurring commissions matter.
Why Remix Fits This Handoff
Web-Standard Forms
A hidden field can carry the generated referral ID into an action.
Server-Owned Stripe Secret
Checkout creation stays in protected Remix server code.
Outcome-Based Testing
Verification covers the Stripe object and AffiliateBase records, not only client state.
Remix Affiliate Tracking Questions
Can a loader read window.AffiliateBase?
Is an AffiliateBase npm package required?
What proves setup is working?
Related platform guides
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.
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.
Stripe Affiliate Program Setup
Run an affiliate or referral program on Stripe. Connect your account, give partners referral links or promo codes, and track recurring commissions.
Test the Remix Checkout Action
Prove one affiliate click through the same action customers use.