Install & setup
Three steps: add the snippet, add the webhook, pass the code into Checkout. Your company’s exact snippet and webhook URL (with your public id) are shown on your dashboard.
Quick start
1. Add the tracking snippet to your site’s head:
<script src="https://ambassly.com/a.js" data-ambassly="YOUR_PUBLIC_ID"></script>
2. In your own Stripe dashboard, add a webhook to your Ambassly hook URL with these events:
https://ambassly.com/api/hook/YOUR_PUBLIC_ID checkout.session.completed invoice.paid charge.refunded customer.subscription.deleted
3. Pass the referral code into Stripe Checkout:
const code = window.Ambassly?.getCode();
stripe.checkout.sessions.create({
client_reference_id: code, // or metadata: { ambassly: code }
});Guides
Install the Ambassly Tracking Snippet
Add a.js to your site, understand the ?via= referral cookie, and test that attribution is ready for Stripe Checkout.
Pass Ambassly Referrals into Stripe Checkout
Copy-paste examples for sending Ambassly referral codes to Stripe Checkout Sessions and Payment Links.
Set Up the Stripe Webhook
Add Ambassly's per-company Stripe webhook endpoint, choose the required events, and understand signature verification and idempotency.
Ambassly Attribution Rules
The exact attribution, hold, clawback, and self-referral rules Ambassly applies to merchant Stripe events.
A note on Safari: tracking prevention caps client-set cookies to about 7 days, so a long developer-tool funnel can outlast the cookie. Passing the code into the Checkout Session (step 3) is the durable fix — once it’s on the session it never expires. We document this rather than pretend it away.