Skip to main content

Astro Affiliate Program Setup for Stripe Checkout

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

  1. Referred visit

    ?via=partner

    AffiliateBase captures the visit and generates a referral record.

  2. Checkout handoff

    referral ID

    The checkout must carry the generated identifier into Stripe.

  3. Paid event

    $99 paid

    A supported Stripe event confirms the attributed payment.

  4. Commission

    $19.80 due

    An eligible attributed sale creates the commission record.

  5. 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:

1

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.
2

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.
html
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>
3

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.
4

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.
5

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?
Yes. The tracking script runs in the browser. The payment path must still carry the generated referral ID into a supported Stripe checkout.
Does an Astro API route automatically know the referral?
No. Browser state does not appear on the server automatically; submit the generated referral ID and validate it before creating the Checkout Session.
How do I know the integration works?
Use the generated setup-test link and verify the referral ID on the completed Stripe checkout, then confirm the sale and commission in AffiliateBase.

Related Platform Guides

Test Your Astro Affiliate Funnel

Create a campaign, install the script, and verify one complete checkout before inviting partners.