Integrations — Stripe Checkout

Affiliate tracking for a custom Stripe Checkout. One snippet, ten minutes.

No page builder in the stack — just your own app calling Stripe directly. Paste one script tag in your layout's <head>, stamp the Checkout Session server-side, and Qanary tracks every conversion.

one script tag, one server-side field. that's the whole integration.

Beyond Stripe Checkout's built-in tools

You built your own checkout. Most affiliate tools assume you didn't.

However you're tracking referrals on Stripe Checkout today — a spreadsheet, a generic pixel, or nothing yet — attribution needs to survive ad blockers, the commission math needs to survive an audit, and the payout needs to go out on a rail you already use. Here's what one script tag adds:

Tracking it yourself

Basic click tracking at best — no coupon-code fallback for ad blockers or podcasts, no fraud check before a commission is owed, and payouts mean a manual spreadsheet.

Qanary

One script tag in your app layout's <head>. Coupon-code fallback, fraud checks before commission, and payouts through Wise or PayPal — the same system whether you're on Stripe Checkout or anywhere else.

How it works

Paste, stamp, verify. Three steps.

1. Paste the tracking snippet — your app layout's <head>. It sets the first-party attribution cookie when a visitor lands with ?via=AFFILIATE_CODE 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 a test ?via=, run a test-mode checkout, and confirm the conversion lands attributed — or ask your coding agent to run the MCP diagnose_attribution tool.

app layout · head
<script src="https://app.qanary.cloud/qanary.js"
  data-qanary="YOUR_PROGRAM_SLUG" async></script>

Paste this exact tag into your app layout's <head>, publish, and it's live. Swap YOUR_PROGRAM_SLUG for the program slug from your Qanary dashboard.

What the snippet does

One tag. Three jobs.

Sets the attribution cookie

Reads ?via=AFFILIATE_CODE off the URL the moment a visitor lands and records the touchpoint — no configuration beyond the program slug.

Stamps your Checkout Session

Feeds client_reference_id and metadata.qanary_visitor directly into the server-side call that creates your Checkout Session.

Verifiable end to end

Ask your coding agent to run diagnose_attribution and it walks visit → identify → webhook → attribution → ledger, so a stalled conversion is never a mystery.

Common custom-checkout setups

Whatever you built, this is the whole integration.

A custom-built SaaS app

No page builder in the stack at all — just your own front end calling Stripe directly. The snippet and a few server-side lines are the entire integration.

Server-rendered checkout flow

Whether it's Rails, Django, Next.js, or anything else, the same two fields — client_reference_id and metadata — carry the referral through.

Marketing site, app on a subdomain

Keep the snippet on the marketing pages and read the stamp when the app's own backend creates the Checkout Session.

Migrating from another tool

Swap the old tracking snippet for Qanary's in your layout — existing ?via= links your affiliates already shared keep working.

At a glance

See it side by side.

Capability Tracking it yourself Qanary
Setup time on Stripe Checkout Custom dev project ~10 minutes
Works without a page builder in the stack No Yes
Fraud checked before commission is owed No Yes
Falls back with no page to instrument No Yes, via coupon codes
Why this beats a spreadsheet

It works the day you publish.

FAQ

Fair questions.

Where exactly does the snippet go?

In your app's shared layout <head>, so it loads on every page a visitor might land on with a ?via= link — no page-builder panel involved.

Does the snippet slow down my site?

No — it loads with the async attribute, so it fetches in the background and never blocks page rendering.

What exactly do I send to Stripe server-side?

Set client_reference_id to Qanary.checkoutStamp().ref and metadata.qanary_visitor to stamp.visitor_id when you create the Checkout Session — that's the entire server-side integration.

Does the webhook need any extra configuration?

No — the webhook connection you set up during onboarding already listens for the Checkout Session completed event and reads the fields you stamped.

Can an AI agent install this for me?

Yes — point Claude Code, Cursor, or Codex at Qanary's llms.txt and it can install the tracking snippet and wire a webhook from a single prompt. See the AI agent page for the exact setup.

Go deeper

Everything you need to start tracking.

Paste the snippet. Start tracking tonight.

Join the waitlist now; when registration opens, wire your custom Stripe integration in ten minutes.

Join the waitlist