Manual integration guide
How to wire it up yourself — no Claude/MCP needed. First, head to List your app to get your tracking snippet and webhook URL. The values below come from that confirmation screen.
1. Install the tracking snippet
Paste the snippet from the confirmation screen into the <head> of every page on your site. It reads ?via= from the incoming URL, stores it as a cookie in the visitor's browser (on your domain), and exposes it as window.KOMMIT_VIA.
(When someone clicks a promoter link /r/<code>, we append ?via=<code> to your destination URL.)
2. Pass the attribution value to checkout
At checkout, pass window.KOMMIT_VIA to Stripe as the client_reference_id.
A. Stripe Checkout (server session)
// Client: pass the via value to your server when starting checkout
fetch("/create-checkout-session", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ via: window.KOMMIT_VIA }),
});
// Server: set it as client_reference_id when creating the session
const session = await stripe.checkout.sessions.create({
mode: "subscription", // or "payment"
line_items: [{ price: PRICE_ID, quantity: 1 }],
client_reference_id: req.body.via ?? undefined,
success_url: "...",
cancel_url: "...",
});B. Stripe Payment Link
Append it to the payment link as a parameter:
// Auto-append client_reference_id to your payment-link buttons
document.querySelectorAll("a[href^='https://buy.stripe.com/']").forEach(function (a) {
if (window.KOMMIT_VIA) {
var u = new URL(a.href);
u.searchParams.set("client_reference_id", window.KOMMIT_VIA);
a.href = u.toString();
}
});3. Register the webhook (in your Stripe)
- Stripe dashboard → Developers → Webhooks → Add endpoint
- Endpoint URL = the webhook URL from the confirmation screen (program-specific,
…/api/stripe/webhook/<token>) - Select events:
checkout.session.completed,invoice.paid - Copy the Signing secret (
whsec_…) shown after you create it - Paste it into “Save webhook secret” on the Kommit confirmation screen → Save
You must save the secret so we can verify your webhook's signature and record conversions. (Without it, the webhook returns 503.)
4. Verify
Run a test payment with ?via=<code> stored, and the conversion is attributed to the promoter and a commission is created. (Rate × payment amount, confirmed after the holding period → paid out to the promoter's Connect account.)