1. Quick start
- Sign up with your email. You'll get a magic link.
- Name your program. Pick a slug (e.g.
acme) and set your commission % (default 30%). - Connect Polar in
/dashboard/settings, paste your Polar webhook secret, add our webhook URL in Polar. - Set your website URL in
/dashboard/settings. Affiliate links will be built off this, e.g.https://yoursite.com/?ref=abc1234. - Drop the tracking script on that same site, so the
?ref=cookie is captured when affiliates send traffic. - Share
https://usesled.com/acme/joinwith potential affiliates. They sign up and get their own link.
2. How attribution works
An affiliate sale follows this chain:
- An affiliate shares their link, e.g.
https://yoursite.com/?ref=abc1234(domain comes from your “Your website” setting) - A visitor clicks it. Our tracking script reads
?ref=abc1234and stores it in ata_refcookie (90 days default). - The visitor browses your site, eventually buys something through Polar / Stripe / etc.
- Your checkout code passes the cookie value as
metadata.referralto the payment provider. - The provider fires a webhook to Sled. We look up the referral code → match it to an affiliate → record the conversion + commission.
- Your affiliate sees the sale in their dashboard. You see it in yours.
3. Polar.sh integration
Step 1: Add the webhook in Polar
In your Polar dashboard → Settings → Webhooks → Add endpoint:
| Field | Value |
|---|---|
| URL | https://usesled.com/acme/api/webhook/polar |
| Events | order.created, order.paid, order.refunded, subscription.canceled |
Copy the signing secret Polar generates. You'll paste it in your Sled settings.
Step 2: Paste the secret in Sled
Go to /dashboard/settings → Polar webhook secret → paste the value → save.
Step 3: Attach the referral cookie in your checkout
Wherever you create a Polar checkout session, attach the ta_ref cookie value as metadata:
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({ accessToken: process.env.POLAR_ACCESS_TOKEN });
const checkout = await polar.checkouts.create({
products: [productId],
successUrl: "https://yourapp.com/thanks",
metadata: {
referral: req.cookies.ta_ref ?? "",
},
});That's it. When a referred customer pays, the conversion appears in /dashboard within seconds.
Using a static Checkout Link instead?
If you send customers to a Polar Checkout Link (a payment link you copied from the Polar dashboard) rather than creating the checkout through the API, Polar won't let you attach arbitrary metadata, the code sample above doesn't apply. Append the referral as reference_id instead:
https://buy.polar.sh/polar_cl_xxx?reference_id=<ta_ref cookie value>
Sled reads reference_id and custom_field_data.referral as fallbacks for metadata.referral, so either surface attributes correctly. You still need to read the ta_ref cookie and build the link with it, a bare link with no reference_id records the sale with no affiliate attached.
reference_id.order.created / order.paid event shows up as ignored in your webhook log, no commission on $0, as expected. The referral isn't lost: we save it against the subscription id, and the first real charge (trial end, or any later renewal) attributes to the same affiliate automatically, even though that charge's webhook doesn't carry the original checkout metadata.4. Stripe integration
Webhook URL: https://usesled.com/acme/api/webhook/stripe
Events: checkout.session.completed, charge.refunded
Pass the referral in checkout session metadata:
const session = await stripe.checkout.sessions.create({
// ...your existing fields
metadata: { referral: getCookie("ta_ref") || "" },
});Paste the Stripe signing secret in /dashboard/settings → Stripe webhook secret.
5. Paddle integration
Webhook URL: https://usesled.com/acme/api/webhook/paddle
Events: transaction.completed, adjustment.created, adjustment.updated, subscription.canceled
Pass the referral in checkout custom data:
const checkout = await paddle.checkouts.create({
items: [{ priceId, quantity: 1 }],
customData: { referral: getCookie("ta_ref") || "" },
});Paste the Paddle notification secret in /dashboard/settings → Paddle webhook secret. Paddle signs every delivery with Paddle-Signature (HMAC-SHA256) and Sled verifies it before crediting anything. Refunds and chargebacks arrive as approved adjustment events and claw commission back automatically; renewals inherit the original affiliate via the subscription id.
6. Other providers
For any provider that can POST JSON, use our generic webhook. POST to https://usesled.com/acme/api/webhook/generic:
{
"event": "order",
"orderId": "ord_12345",
"amount": 4900,
"email": "customer@example.com",
"metadata": { "referral": "abc1234" }
}For refunds:
{ "event": "refund", "orderId": "ord_12345" }Set a shared secret in /dashboard/settings → Generic webhook secret → and send it on every request as either X-Webhook-Secret: yoursecret or Authorization: Bearer yoursecret.
Amounts are always in cents.
7. Tracking script
Embed on any page where affiliate links land (usually your marketing site root):
<script async src="https://usesled.com/acme/t.js"></script>
/dashboard/settings. That's where affiliates' ?ref= links will land, if the script isn't there, the cookie never gets set and clicks aren't tracked.What it does, in order:
- Reads
?ref=CODEfrom the URL. - Stores
CODEin ata_refcookie for the configured attribution window (90 days default). - Pings
https://usesled.com/acme/api/clickto record the click. We dedupe by IP for 24 hours so refreshes don't inflate stats.
It's less than 1KB minified. No external dependencies. No third-party calls.
8. Affiliates
Inviting them
Share https://usesled.com/acme/join. Anyone with the link can sign up, name + email, that's it. They immediately get their affiliate link.
What they see
- Their unique referral link, built off the URL you set as “Your website” in
/dashboard/settings - Click count, conversion count, revenue, earnings
- Pending vs paid amounts
- A form to add payout details (PayPal, Wise, IBAN, crypto wallet), only after they earn their first commission
Managing them
In /dashboard/affiliates you see everyone's stats, clicks, conversions, owed, payout method.
Get discovered (optional)
Turn on List in the Sled affiliate directory in /dashboard/settings to let signed-in affiliates find your program at /affiliate/discover and apply. Applications land under /dashboard/affiliates as Pending, you Approve or Decline each one, so nothing goes live without your OK. It's off by default, and your direct /join link still works for instant sign-ups.
9. Payouts
Sled doesn't move money for you. We track who's owed what, you send payments manually from your own PayPal / Wise / bank / crypto wallet.
This means: no KYC, no payment processing fees, no compliance overhead. Just a clean ledger.
The flow
- Open
/dashboard/payouts. Affiliates above your minimum threshold appear in Ready for payout. - Each row shows their payment method (PayPal / Wise / Bank / Crypto) and destination (email / IBAN / wallet address).
- You send the payment manually.
- Click Mark paid in the admin, the affiliate gets an email confirming, their pending balance resets.
Set your minimum payout threshold in /dashboard/settings. Default is $20.
10. Email notifications
We send 3 transactional emails on your behalf:
- Welcome, when an affiliate signs up, with their dashboard URL and referral link.
- First commission, when an affiliate earns their first conversion, prompting them to add payout details.
- Payout sent, when you click Mark paid in the admin.
Emails are sent from affiliates@usesled.com with your program name in the From field, affiliates see “acme · affiliate program” as the sender.
11. Settings
| Setting | What it does |
|---|---|
| Program name | Shown to affiliates on signup and in emails. |
| Your website | Base URL for affiliate referral links. Affiliates will share https://yoursite.com/?ref=CODE. Install the tracking script on this same domain. |
| Commission % | Default 30%. Applied to every conversion. |
| Cookie days | How long the ref cookie lives. Default 90. |
| Minimum payout | Below this, affiliates aren't shown in 'Ready for payout'. |
| Polar webhook secret | Required to verify Polar webhooks. |
| Stripe webhook secret | Required if you use Stripe. |
| Paddle webhook secret | Required if you use Paddle. |
| Generic webhook secret | Required if you use the generic webhook. |
12. AI agents (MCP)
Sled runs an MCP server at https://usesled.com/api/mcp. Any MCP client (Claude Code, Cursor, VS Code, opencode, your own agent) can read your program with a Sled API key: clicks, conversions, commission, payouts and recent activity. No scraping the dashboard, no CSV round-trips.
Setup
- Open
/dashboard/settingsand create a key under AI agents. It is displayed once, so copy it straight away. - Add Sled to your client's MCP config:
{
"mcpServers": {
"sled": {
"type": "http",
"url": "https://usesled.com/api/mcp",
"headers": { "Authorization": "Bearer sled_sk_..." }
}
}
}Clients that take a URL plus an auth header instead of a config file use the same endpoint. Discovery metadata for agents lives at /.well-known/mcp/server-card.json.
Client support today: Claude Code, Cursor, VS Code and opencode connect with a static bearer header. claude.ai custom connectors can do the same through their static header support (beta, an admin enters the key once). ChatGPT connectors require OAuth 2.1, which Sled does not serve yet, so ChatGPT is not supported for now.
Protocol: dual-era. Modern clients (revision 2026-07-28, stateless per-request metadata plus server/discover) and legacy clients (the initialize handshake, 2025-11-25 and earlier) both work against this one endpoint. Requests are capped at 120/minute per key and 300/minute per IP address, and browsers are only accepted from allowlisted origins: MCP clients call server to server, without an Origin header.
Easy setup: copy a prompt
Fastest path. Paste this into whichever agent you already have open (Claude Code, Cursor, VS Code, opencode) and it writes the config for that client, saves it, verifies the connection and reports back.
Add the Sled MCP server to the AI client you are running in, so you can read my affiliate program.
Endpoint: POST https://usesled.com/api/mcp (MCP over HTTP, JSON-RPC 2.0, Streamable HTTP)
Auth: send the header "Authorization: Bearer sled_sk_... (ask me for it)"
Discovery card: https://usesled.com/.well-known/mcp/server-card.json
Tools (all read-only, one program each): get_program_overview, get_metrics, list_affiliates, get_affiliate, list_conversions, list_payouts, get_activity_feed
Do this:
1. Write the MCP config in the format your client uses, then save it and tell me exactly which file you changed.
- Claude Code / Cursor style:
{
"mcpServers": {
"sled": {
"type": "http",
"url": "https://usesled.com/api/mcp",
"headers": { "Authorization": "Bearer sled_sk_..." }
}
}
}
- opencode style:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"sled": {
"type": "remote",
"url": "https://usesled.com/api/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer sled_sk_..." }
}
}
}
2. Do not enable OAuth. This is a static Bearer key, and Sled has no OAuth server, so an OAuth flow will just fail.
3. Verify the connection by calling get_program_overview, then answer: how is my affiliate program doing right now, and what changed in the last 30 days?
Note: Sled shows an API key only once, when it is created (Dashboard, then Settings, then "AI agents"). If you need one, ask me and I will paste it.opencode
opencode keeps MCP servers under an mcp block in~/.config/opencode/opencode.json (or a project opencode.json). oauth: false matters: Sled uses a static Bearer key and has no OAuth server, so an automatic OAuth attempt can only fail.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"sled": {
"type": "remote",
"url": "https://usesled.com/api/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer sled_sk_..." }
}
}
}Check it landed with opencode mcp list, then ask something like use the sled tool: how did my program do this month?
Tools
| Tool | What it returns |
|---|---|
| get_program_overview | Lifetime totals and your program config (commission %, cookie days, minimum payout). Start here. |
| get_metrics | Revenue, commission, first orders vs renewals, clicks, new affiliates and derived rates for a date range. Defaults to the last 30 days. |
| list_affiliates | Affiliates with clicks, conversions, revenue, commission, paid and payable. Sort by revenue, commission, payable, clicks or conversions. |
| get_affiliate | One affiliate in full, by referral code or email. |
| list_conversions | Individual attributed orders: order id, affiliate, amount, commission, provider, renewal flag, status. |
| list_payouts | Recorded payouts with method and date, plus total paid and what is still payable. |
| get_activity_feed | Newest events: joins, first sales, renewals, refunds and payouts. |
Money comes back as USD (cents plus a formatted string such as $412.50) and every date filter is UTC and inclusive on both ends. Refunded conversions stay visible instead of disappearing, so clawed-back money can't be mistaken for revenue.
Things worth asking
- “How much commission did Sarah drive this quarter, and how much is still owed to her?”
- “Which affiliates have real clicks but zero conversions?”
- “Summarize my affiliate program up to today: revenue, top three affiliates, anything refunded.”
13. Plans
| Free trial | Pro | |
|---|---|---|
| Price | $0 for 10 days | $19/mo code LAUNCH7: $12/mo first 3 months |
| Max affiliates | Unlimited | Unlimited |
| All webhooks | ✓ | ✓ |
| Email notifications | ✓ | ✓ |
| Priority support | - | ✓ |
See full pricing & FAQ on the pricing page.
14. Troubleshooting
| Symptom | Fix |
|---|---|
| Webhook not arriving | Send a test event from the Polar dashboard. Check that the webhook URL matches your slug exactly (no typos). |
| Conversion not recorded | Your checkout's metadata.referral was empty. Verify your checkout code reads the ta_ref cookie before creating the session. |
| Affiliate code not detected | The ta_ref cookie didn't set. Make sure ?ref= was in the URL when the visitor first arrived on your site, and that the tracking script is loaded on that domain. |
Affiliate links show usesled.com instead of my site | Set “Your website” in /dashboard/settings. Existing affiliates need to re-copy their link from their dashboard, Sled doesn't rewrite links they've already shared. |
| Changed my website URL but old shared links still go to the old domain | By design. Sled doesn't auto-rewrite links affiliates have already shared publicly. Ask them to grab the new link from their dashboard, or set up a redirect from the old domain to the new one yourself. |
| Affiliate can't access their dashboard | The dashboard URL is their secret, they should bookmark it. If lost, you can find their code in /dashboard/affiliates and resend the URL. |
| Wrong commission amount | Check the commission % in /dashboard/settings. Changes apply to NEW conversions only. |
| Dashboard locked, affiliate signups blocked | Your 10-day free trial ended. Upgrade to Pro and everything unlocks right away. Nothing was deleted. |
Still stuck?
Email hey@ardakaanozcan.com goes straight to the founder. Pro plan customers get priority response.