Know what must work before you launch
A practical path from a tracked Astro landing page to a verified Stripe sale
- Best fit
- Teams evaluating AffiliateBase for a Astro 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 a merchant who controls an Astro site and wants to run a program for its own partners. It is not a directory for joining Astro's company affiliate program.
You need an AffiliateBase campaign, a browser-rendered page that can load the tracking script, and a supported Stripe checkout. Astro can render the sales page statically or on demand; attribution still depends on carrying AffiliateBase's generated referral ID from the browser into checkout.
Astro's script guide explains external client scripts. Use the Stripe checkout guide for the handoff, then complete the tracking verification checklist.
Treat the site, checkout, and webhook result as one testable path:
Choose the Checkout Path
Use a Stripe Payment Link, Buy Button, or Pricing Table on the tracked page, or plan a server-created Checkout Session that accepts the generated referral ID. A separate hosted checkout is not compatible by default.
Load AffiliateBase in the Browser
Place the account-specific script in the shared Astro layout or sales-page component so it renders in the browser. If Astro view transitions are enabled, test referral capture after client-side navigation as well as a full page load.
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>Connect the Matching Stripe Account
Connect the Stripe account that receives the customer payment. For custom Checkout Sessions, submit the generated referral ID to the server and use it as client_reference_id; do not send the public ?via token.
Run a Published Test
Open AffiliateBase’s generated test link on the deployed Astro site, confirm a referral is created, and complete the selected checkout path.
Verify the Outcome
Confirm the completed checkout carried the generated referral ID, then check for the resulting sale and commission. Test a renewal or refund separately if those events matter to your program.
Why Astro Teams Use This Path
Works with Astro Rendering Choices
Referral capture runs in the visitor’s browser whether the sales page was built statically or rendered on demand.
Keeps Server Boundaries Explicit
Custom checkout code receives browser referral state through a deliberate form or API handoff.
Verifies Revenue Attribution
The final check covers the referral, Stripe event, sale, and commission rather than stopping at script load.
Astro Affiliate Program Questions
Can I add AffiliateBase to a static Astro site?
Does an Astro API route automatically know the referral?
How do I know the integration works?
Related platform guides
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.
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 SvelteKit
Install affiliate tracking in SvelteKit, send the generated referral ID to a server route or action, and verify Stripe attribution.
Test Your Astro Affiliate Funnel
Create a campaign, install the script, and verify one complete checkout before inviting partners.