Connect Generic Stripe Checkout to Qanary
Time: ~10 minutes. You need: a Qanary program (its slug), your billing provider already connected in Qanary onboarding, and admin access to Generic Stripe Checkout.
1 · Paste the tracking snippet
<script src="https://app.qanary.cloud/qanary.js" data-qanary="YOUR_PROGRAM_SLUG" async></script>
Paste the snippet in your app layout’s
.The snippet sets the first-party attribution cookie when a visitor lands with
?via=AFFILIATE_CODE (the link format your affiliates already share)
and records the touchpoint.
2 · Carry the referral into checkout
Server-side, when creating the Checkout Session, set client_reference_id to Qanary.checkoutStamp().ref and metadata.qanary_visitor to stamp.visitor_id. That’s the whole integration — the webhook connection you made during onboarding closes the loop.
3 · Verify
- Open your site with
?via=<a promoter code>in a private window. - Run a test-mode checkout.
- In Qanary: the conversion appears attributed to that promoter — or ask your coding
agent to run the MCP
diagnose_attributiontool, which walks visit → identify → webhook → attribution → ledger and tells you exactly where anything is off. - Optional: add a webhook endpoint (Webhooks page) and press Send test event to verify your automation receiver too.
Verification checklist (fill in before publishing)
- Snippet loads on the platform’s published site (not just the editor preview)
-
?via=visit recorded (check_events shows the touchpoint) - Test checkout attributes to the right promoter
- Recorded by: ______ / date: ______
