Getting Started
Overview
Quickstart
Authentication
Plan Access
Rate Limits
Errors
Pagination
Idempotency
Changelog
Guides
REST API: Campaigns
Affiliates
Conversions
Affiliate Teams
SCALE
Coupons
Payouts
Other
Webhooks
MCP Server (AI)
One script tag and, for checkouts your server creates, one field. Written for you and for your coding agent: connect your payment provider, pass the referral to checkout, and check it with a test sale.
5 min read
Using a coding agent?
Tell it: “Add LinkJolt affiliate tracking to this app, following linkjolt.io/developers/quickstart.md”. That address is this page as plain markdown. Steps marked “You, in your browser” are yours; the agent does the rest.
LinkJolt tracks the sales your affiliates bring in through their links and discount codes, straight from your own payment provider, gives affiliates a portal, and lets you pay them through Stripe payouts or a PayPal or Wise file. LinkJolt never holds your money. There is nothing to install from npm.
Sign up at https://www.linkjolt.io/auth/sign-up. Plans start at $19.99 a month, with a 7-day free trial (card required) and 0% of your sales taken.
Create a campaign: the commission (for example 20% of every payment, renewals included) and the page affiliate links send people to.
Working in Claude Code or Codex? Add the LinkJolt connector (below) and your agent can read your setup and tracking script and name the business before you pick a plan, then create the campaign once your trial has started. You sign in once in the browser.
In LinkJolt, open Integrations and pick your provider. This is the step that sends sales to LinkJolt, and it happens in your browser: an agent cannot approve it for you.
Put the script on every page of the site, in the root layout. Your merchant id is in the script tag shown on Integrations (or ask the connector for it).
When a visitor arrives through an affiliate link (?tc=...&aff=...), the script keeps the referral for 30 days and exposes it as window.linkjolt.referral, a string like tc_abc_aff_xyz_cid_123. On a visit without an affiliate it is empty.
import Script from 'next/script';
// inside <body> of the root layout
<Script src="https://www.linkjolt.io/api/tracking.js?id=YOUR_MERCHANT_ID" strategy="afterInteractive" />TypeScript projects can declare the global once:
// global.d.ts, so window.linkjolt type-checks
interface Window {
linkjolt?: { referral: string | null };
}Find how the app takes payment and make the one change for it. Never rename the field or put the referral anywhere else: that field is what LinkJolt reads. Renewals, refunds and plan changes are tracked from the first payment, so there is nothing to build for them.
Read window.linkjolt.referral in the browser, send it with the checkout request, and set it as client_reference_id on the Checkout Session.
How to spot it: the stripe package, and stripe.checkout.sessions.create in a route or server action. Full steps: /developers/quickstart/stripe.md
// Browser: the page that starts checkout
const referral = window.linkjolt?.referral || '';
const res = await fetch('/api/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ priceId, referral }),
});
// Server: where the Checkout Session is created
const { priceId, referral } = await req.json();
const session = await stripe.checkout.sessions.create({
// ...your existing options
client_reference_id: referral || undefined,
});Nothing beyond the tracking script: it adds the referral to every buy.stripe.com link and sets client-reference-id on the pricing table and buy button.
How to spot it: buy.stripe.com links, <stripe-pricing-table> or <stripe-buy-button>. Full steps: /developers/quickstart/payment-links.md
Pass the referral as customData.linkjolt when opening Paddle Checkout.
How to spot it: @paddle/paddle-js, Paddle.Checkout.open or paddle.Checkout.open. Full steps: /developers/quickstart/paddle.md
paddle.Checkout.open({
items: [{ priceId, quantity: 1 }],
customData: { linkjolt: window.linkjolt?.referral || '' },
});Checkout links need nothing beyond the script. A checkout your server creates sets the referral as metadata.reference_id.
How to spot it: @polar-sh/sdk, or links to buy.polar.sh. Full steps: /developers/quickstart/polar.md
const checkout = await polar.checkouts.create({
products: [productId],
successUrl,
metadata: referral ? { reference_id: referral } : {},
});Payment links need nothing beyond the script. A checkout your server creates sets the referral as metadata.linkjolt_ref.
How to spot it: the creem package, creem.io payment or product links. Full steps: /developers/quickstart/creem.md
import { Creem } from "creem";
const creem = new Creem({ apiKey: process.env.CREEM_API_KEY });
const checkout = await creem.checkouts.create({
productId: "prod_123",
successUrl: "https://example.com/thanks",
metadata: { linkjolt_ref: referral }, // the value from window.linkjolt.referral
});
// send the customer to checkout.checkoutUrlNothing beyond the tracking script: it adds the referral to those links.
How to spot it: links to *.lemonsqueezy.com, *.gumroad.com or gum.co. Full steps: /developers/quickstart/payment-links.md
Open the site with ?tc=TEST&aff=TEST and run window.linkjolt.referral in the browser console: it should print tc_TEST_aff_TEST.
For a real check, use the test link on the Integrations page and buy in your provider's test mode. With Set up with Stripe, a Stripe test-mode purchase is recorded as a test sale (a Stripe sandbox is a separate account, so it is not). Creem test-mode purchases and Paddle sandbox purchases with a sandbox key connected are test sales too. Test sales are listed under Commissions → Test sales, apart from real commissions.
The LinkJolt connector lets an agent read your setup and your own tracking script and name the business, and once your trial has started, create the campaign and invite your first affiliate. You sign in once in the browser; there is no API key to paste. Other clients, Cursor included, are on the connector page.
claude mcp add --transport http --scope user linkjolt https://www.linkjolt.io/api/mcp
# then inside Claude Code: /mcp, pick linkjolt, authenticateThe LinkJolt skill walks any agent through this page. It installs in Claude Code, Codex, Cursor and other agents:
npx skills add https://www.linkjolt.io