diff --git a/content/docs/api-reference/errors.mdx b/content/docs/api-reference/errors.mdx index bf02744..d3cbe75 100644 --- a/content/docs/api-reference/errors.mdx +++ b/content/docs/api-reference/errors.mdx @@ -2,7 +2,7 @@ title: Errors & Troubleshooting description: All API error codes, their causes, and how to fix common integration problems. kind: reference -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- > **Beta** — The Affitor SDKs and CLI are in active development. The documented happy-path works; edge cases may change. Report issues on GitHub. @@ -193,7 +193,7 @@ The JSON body also gains a `warnings` array. No existing field is removed or ren This body is the [typed envelope](#the-typed-envelope): no `data` key, and an `error.code` to branch on. -**Fix:** In your Affitor dashboard, go to **Settings** → **API keys** and regenerate the key, then update `AFFITOR_API_KEY` on your server with the new value. See [Rotate your API key](/docs/brand/settings#step-3-regenerate-the-key) for the full walkthrough. +**Fix:** In your Affitor dashboard, open the program menu and choose **Program settings**. Under **Developers** → **API keys**, regenerate the key, then update `AFFITOR_API_KEY` on your server with the new value. See [Rotate your API key](/docs/brand/settings#step-3-regenerate-the-key) for the full walkthrough. --- @@ -437,7 +437,7 @@ An expired session is not an error on `/auth/poll`: it answers `200` with `"data |----------|--------|---------------|---------|-----| | both | `401` | `Missing or malformed Authorization header. Expected: Bearer ` | The `Authorization` header is missing or does not start with `Bearer ` | Send `Authorization: Bearer YOUR_PROGRAM_API_KEY` | | both | `401` | `Missing API token` | The token is empty after `Bearer ` | Check for an empty env variable | -| both | `401` | `Invalid API key. To get a working key for the program you already have, ask a workspace owner of that program to open Affitor → Settings → API Key and click Regenerate, then replace the key you are sending with the new one.` | The key matches no program | Do as the message says. Running `affitor init` does not help: it creates a second program | +| both | `401` | `Invalid API key. To get a working key for the program you already have, ask a workspace owner of that program to open Affitor → Settings → API Key and click Regenerate, then replace the key you are sending with the new one.` | The key matches no program | Do as the message says: the key is under program menu → **Program settings**, then **Developers** → **API keys**. Running `affitor init` does not help: it creates a second program | | both | `401` | [`api_key_rotation_required`](#api_key_rotation_required) | The key is retired | Create a new key | | `GET /status` | `500` | `Failed to get status (request_id: )` | Status lookup failed on our side | Retry with backoff | | `POST /test-event` | `400` | `Invalid event_type: . Valid: click, lead, sale` | Single-event mode got a missing or unknown `event_type` | Send `click`, `lead` or `sale`, or `{"type": "chain"}` for the full chain | diff --git a/content/docs/api-reference/integrations/fastify.mdx b/content/docs/api-reference/integrations/fastify.mdx index fcecfee..55be4de 100644 --- a/content/docs/api-reference/integrations/fastify.mdx +++ b/content/docs/api-reference/integrations/fastify.mdx @@ -2,7 +2,7 @@ title: "Fastify" description: "Server-side Affitor integration with @affitor/sdk/server — track signups and sales from your Fastify backend, including a raw-body Stripe webhook." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide wires Affitor into a Fastify app. Because Fastify is a pure server runtime, the click is captured by a frontend script tag, then the `affitor_click_id` is forwarded to your server so all tracking calls — lead and sale — happen server-side with `@affitor/sdk/server`. The sale is tracked from your Stripe webhook handler, which needs the **raw request body** for signature verification. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls (dashboard → API keys) - `@affitor/sdk` and `stripe` installed in your backend diff --git a/content/docs/api-reference/integrations/nextjs-clerk.mdx b/content/docs/api-reference/integrations/nextjs-clerk.mdx index 91d74e0..1993d2c 100644 --- a/content/docs/api-reference/integrations/nextjs-clerk.mdx +++ b/content/docs/api-reference/integrations/nextjs-clerk.mdx @@ -2,7 +2,7 @@ title: "Next.js + Clerk" description: "Add Affitor tracking to a Next.js (App Router) app that uses Clerk for authentication." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide covers the auth-specific parts of an Affitor integration when your Next.js app uses Clerk. Steps 1 (capture the click) and 3 (track the sale) are identical to the [base Next.js guide](/docs/api-reference/integrations/nextjs) — this guide focuses on **Step 2: tracking the signup** with Clerk's identity model. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls (leads and sales) - A Next.js App Router app with **Clerk** configured diff --git a/content/docs/api-reference/integrations/nextjs-nextauth.mdx b/content/docs/api-reference/integrations/nextjs-nextauth.mdx index 7bd29e5..c344978 100644 --- a/content/docs/api-reference/integrations/nextjs-nextauth.mdx +++ b/content/docs/api-reference/integrations/nextjs-nextauth.mdx @@ -2,7 +2,7 @@ title: "Next.js + NextAuth" description: "Add Affitor lead tracking to a Next.js app using NextAuth (Auth.js) — handle the click-id cookie gap correctly." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide covers the signup step when your Next.js app uses **NextAuth (Auth.js)** for authentication. Steps 1 (capture click) and 3 (track sale) are identical to the [base Next.js guide](/docs/api-reference/integrations/nextjs) — this page focuses on what is different: wiring the lead call to NextAuth's auth lifecycle without losing the click attribution. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls - A Next.js App Router app with NextAuth (Auth.js) configured diff --git a/content/docs/api-reference/integrations/nextjs-supabase.mdx b/content/docs/api-reference/integrations/nextjs-supabase.mdx index cb52e09..362c0aa 100644 --- a/content/docs/api-reference/integrations/nextjs-supabase.mdx +++ b/content/docs/api-reference/integrations/nextjs-supabase.mdx @@ -2,7 +2,7 @@ title: "Next.js + Supabase Auth" description: "Add Affitor tracking to a Next.js app that uses Supabase Auth — clicks, signups, and sales." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide covers the Supabase-specific signup step. Steps 1 (capture the click) and 3 (track the sale) are identical to the [base Next.js guide](/docs/api-reference/integrations/nextjs) — refer there for full detail. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls (leads and sales) - A Next.js app with **Supabase Auth** configured diff --git a/content/docs/api-reference/integrations/nextjs.mdx b/content/docs/api-reference/integrations/nextjs.mdx index 639605e..fc25a70 100644 --- a/content/docs/api-reference/integrations/nextjs.mdx +++ b/content/docs/api-reference/integrations/nextjs.mdx @@ -2,7 +2,7 @@ title: "Next.js" description: "Add Affitor tracking to a Next.js (App Router) app — clicks, signups, and sales." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide wires Affitor into a Next.js App Router app with the three moves every integration needs: **capture the click**, **track the signup**, **track the sale**. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls (leads and sales) - A Next.js app on the **App Router** diff --git a/content/docs/api-reference/integrations/node-express.mdx b/content/docs/api-reference/integrations/node-express.mdx index 562f689..876bd1a 100644 --- a/content/docs/api-reference/integrations/node-express.mdx +++ b/content/docs/api-reference/integrations/node-express.mdx @@ -2,7 +2,7 @@ title: "Node / Express" description: "Server-side Affitor integration with @affitor/sdk/server — track signups and sales from your Express backend." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide wires Affitor into a Node.js / Express app. Because Express is a pure server runtime, the click is captured by a frontend script tag, then the `affitor_click_id` is forwarded to your server so all tracking calls — lead and sale — happen server-side with `@affitor/sdk/server`. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) +- Your **program ID** (program menu → **Program settings** → **Business**) - A **program API key** for server-side calls (dashboard → API keys) - `@affitor/sdk` installed in your backend diff --git a/content/docs/api-reference/integrations/polar.mdx b/content/docs/api-reference/integrations/polar.mdx index 20b8924..ae4a18f 100644 --- a/content/docs/api-reference/integrations/polar.mdx +++ b/content/docs/api-reference/integrations/polar.mdx @@ -2,7 +2,7 @@ title: "Polar" description: "Canonical recipe for attributing Polar payments to Affitor partners — one-time, subscriptions, renewals, and refunds. No Stripe account needed." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide is the **canonical reference for the Polar sale path**. Polar is a merchant of record, so there is no Stripe account to connect — instead, your app hosts a small webhook route that reports every paid order to Affitor. @@ -15,7 +15,7 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** and a **program API key** (run `npx affitor init`, or **Settings** → **Program settings** → **Business** for the ID and **Developers** → **API keys** for the key) +- Your **program ID** and a **program API key** (run `npx affitor init`, or, in the program menu, **Program settings** → **Business** for the ID and **Developers** → **API keys** for the key) - A Polar organization with checkout working in your app - Access to your Polar organization's webhook settings. Sandbox is a separate environment with its own tokens and its own webhook endpoints (`sandbox-api.polar.sh`). diff --git a/content/docs/api-reference/integrations/stripe.mdx b/content/docs/api-reference/integrations/stripe.mdx index 1f8a2f3..2333a01 100644 --- a/content/docs/api-reference/integrations/stripe.mdx +++ b/content/docs/api-reference/integrations/stripe.mdx @@ -2,7 +2,7 @@ title: "Stripe" description: "Canonical recipe for attributing Stripe payments to Affitor partners — one-time and recurring." kind: guide -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- This guide is the **canonical reference for the Stripe sale path**. Other framework guides (Next.js, Express, etc.) link here for Step 3. If you need click capture or signup tracking first, start with the [Next.js guide](/docs/api-reference/integrations/nextjs) or the framework guide for your stack. @@ -15,10 +15,10 @@ The `@affitor/sdk` package is **Beta**. The documented happy-path works; report ## Prerequisites -- Your **program ID** (**Settings** → **Program settings** → **Business**) -- A **program API key** (dashboard → program settings → API keys) +- Your **program ID** (program menu → **Program settings** → **Business**) +- A **program API key** (program menu → **Program settings**, then **Developers** → **API keys**) - Stripe Checkout or Stripe Billing already working in your app -- Affitor receiving your Stripe webhooks (dashboard → program settings → Stripe connect) +- Affitor receiving your Stripe webhooks (program menu → **Program settings** → **Payments**, **Connect Stripe**) ## 1. Capture clicks and track signups diff --git a/content/docs/api-reference/mcp.mdx b/content/docs/api-reference/mcp.mdx index dc20aa2..a4eee9a 100644 --- a/content/docs/api-reference/mcp.mdx +++ b/content/docs/api-reference/mcp.mdx @@ -2,7 +2,7 @@ title: Affitor MCP server description: Connect Claude, ChatGPT, Cursor, VS Code, Perplexity, Claude Code, Codex and other AI apps to your Affitor program or partner account at https://mcp.affitor.com/mcp. Sign in with your Affitor account; access is read-only. kind: reference -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- The Affitor MCP server lets an AI app read your Affitor data: a brand's program, partners, applications, commissions and billing, or a partner's programs, links, earnings, commissions and payouts. It is a hosted [Model Context Protocol](https://modelcontextprotocol.io) server. You sign in with your Affitor account, no API key needed, and the connection is read-only: it cannot change data or move money. @@ -38,7 +38,7 @@ https://mcp.affitor.com/mcp ## Connect your AI app -In the Affitor dashboard, **Connect an AI tool** shows the server URL and steps for Claude, Cursor, Claude Code and Codex. Brands find it in **All settings** › **Developers** › **AI agents**, and on the program's **Tracking** step under **Your agent** › **Connect your AI**. Partners find it in **Settings** › **Integrations**. +In the Affitor dashboard, **Connect an AI tool** shows the server URL and steps for Claude, Cursor, Claude Code and Codex. Brands find it in the program menu under **Program settings**, then **Developers** › **AI agents**, and on the program's **Tracking** step under **Your agent** › **Connect your AI**. Partners find it in the **⋯** menu next to their name, at the bottom of the left menu, under **Integrations**. `. Lowercase letters, numbers and dashes, up to 48 characters. You can change it later | | **Program ID** | Shown, not edited | Used by the tracking script, the API and AI agents. **Copy** copies it | | **Logo** | No | PNG, JPG or SVG, square, under 5 MB | -| **Tagline** | No | In Settings only (**Program settings** → **Business**): one line on your marketplace card, up to 160 characters | +| **Tagline** | No | In **Program settings** → **Business** only: one line on your marketplace card, up to 160 characters | **Continue** saves only the fields you changed and moves on once every save succeeds; an error shows under its field. The step is done once the program has a business name and a website. @@ -191,7 +191,7 @@ Once live, the page says your program is live and shows its link with **Copy lin ## Verify it worked -Open **Settings** → **Program settings** and check that each page kept what you saved: +In the program menu, choose **Program settings** and check that each page kept what you saved: ``` -Replace `YOUR_PROGRAM_ID` with your program ID (**Settings** → **Program settings** → **Business** → **Program ID**, **Copy**). +Replace `YOUR_PROGRAM_ID` with your program ID (program menu → **Program settings** → **Business** → **Program ID**, **Copy**). ### What this does diff --git a/content/docs/faq/index.mdx b/content/docs/faq/index.mdx index 765bab8..ee023a3 100644 --- a/content/docs/faq/index.mdx +++ b/content/docs/faq/index.mdx @@ -2,7 +2,7 @@ title: "Frequently Asked Questions" description: "Common questions about Affitor's pricing, tracking, commissions, and integration options." kind: faq -last_updated: 2026-10-14 +last_updated: 2026-10-17 --- Quick answers about Affitor's pricing, tracking, commissions, and payouts, with links to the full guides where you need more depth. @@ -27,7 +27,7 @@ Affitor differentiates on: ## Accounts ### Can I use a personal email address to sign up? -Yes, but a business email is recommended for team management — a shared address like `partnerships@yourcompany.com` keeps access simple as the team grows. You can update your email later in account settings. +Yes, but a business email is recommended for team management: a shared address like `partnerships@yourcompany.com` keeps access simple as the team grows. Your sign-in email is shown read-only in **Your account** → **Profile** (the **⋯** menu next to your name). ### Is there a cost to create an advertiser account? No. Creating an account is free. The platform fee is $0 until your program earns its first $10,000 through affiliates, then 3.5% on affiliate-driven sales only. diff --git a/content/docs/support/glossary.mdx b/content/docs/support/glossary.mdx index 7afabe1..1aa3b80 100644 --- a/content/docs/support/glossary.mdx +++ b/content/docs/support/glossary.mdx @@ -2,7 +2,7 @@ title: Glossary description: Common terms used across Affitor docs — server-side tracking, Stripe integration, invoice billing, and more kind: reference -last_updated: 2026-10-16 +last_updated: 2026-10-17 --- ## A @@ -58,7 +58,7 @@ A pricing model where fees are tied to partner-generated revenue rather than a m Affitor's fee on partner-generated revenue: $0 until a program's affiliate-driven revenue reaches $10,000, then 3.5% of each affiliate-driven sale. The threshold is counted per program. ### Program ID -The identifier for your Affitor program. It is used in tracker setup, test flows, and Stripe metadata. Find it under **Settings** → **Program settings** → **Business**, where **Program ID** is shown with **Copy**. +The identifier for your Affitor program. It is used in tracker setup, test flows, and Stripe metadata. Find it in the program menu under **Program settings** → **Business**, where **Program ID** is shown with **Copy**. ## R