Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/changelog/refer-program.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: Partners promote Affitor itself through the Refer Program and earn

Affitor has its own affiliate program. Find the **Refer Program** in the marketplace, read the official terms on its landing page, and share your link. You earn $50 when a brand you referred goes live, $350 when its program reaches $10,000 in tracked sales, and 15% of the platform fee it pays for 12 months.

[Read the Refer Program terms](/docs/partners/refer-program)
[Read the Refer Program terms](https://affitor.com/legal/refer-program)
1 change: 0 additions & 1 deletion content/docs/partners/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"---Earn---",
"dashboard",
"payouts",
"refer-program",
"referral-rewards",
"account-settings",
"faq"
Expand Down
4 changes: 2 additions & 2 deletions content/docs/partners/quickstart/get-your-referral-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Get Your Referral Link"
description: "Find, copy, and share your tracked referral link — generated automatically when you join."
kind: quickstart
last_updated: 2026-10-15
last_updated: 2026-10-16
---

Your referral link is the URL you share. Every click and sale through it is credited to you. Best of all, you don't have to create it — Affitor generates it for you.
Expand Down Expand Up @@ -42,7 +42,7 @@ Refer a brand has its own link, separate from your program links: `affitor.com/r

When you are signed in, the **Affitor Refer Program** card (**Get link**), its slide in the **Featured** strip, and **Get your referral link** on its program page open **Referrals** with your link already loaded.

A brand that opens it lands on Affitor's home page with "**your name** invited you" above an email field to start sign-up. A brand that signs up through it is credited to you under the [Affitor Refer Program terms](/docs/partners/refer-program).
A brand that opens it lands on Affitor's home page with "**your name** invited you" above an email field to start sign-up. A brand that signs up through it is credited to you under the [Affitor Refer Program terms](https://affitor.com/legal/refer-program).

## What happens next

Expand Down
4 changes: 2 additions & 2 deletions content/docs/partners/quickstart/promote-your-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Promote Your Link and Earn"
description: "Turn your referral link into commissions — where to share it, what converts, and how to read the results in your dashboard."
kind: guide
last_updated: 2026-07-06
last_updated: 2026-10-16
---

Getting your link is step one; earning from it is the real work. This page covers where a referral link actually converts, how to promote it without burning your audience, and how to use your dashboard to double down on what works.
Expand Down Expand Up @@ -59,4 +59,4 @@ Your **Performance** and **Analytics** views show clicks, signups, and sales ove

- [Getting paid](/docs/partners/payouts) — how commissions become a balance and how to withdraw
- [Your dashboard](/docs/partners/dashboard) — Performance, Analytics, and referred customers
- [Refer other partners](/docs/partners/refer-program) — earn from partners you bring in
- [Refer a brand](/docs/partners/referral-rewards) — earn from brands you bring to Affitor
126 changes: 0 additions & 126 deletions content/docs/partners/refer-program.mdx

This file was deleted.

12 changes: 6 additions & 6 deletions content/docs/partners/referral-rewards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: "How referral rewards work"
description: "Worked examples of the Affitor Refer Program: which brand earns you $50, $350 and 15%, what happens when a brand runs several programs, and who gets credit."
kind: explainer
last_updated: 2026-10-15
last_updated: 2026-10-16
---

The [Refer Program terms](/docs/partners/refer-program) are the rules. This page walks through them with examples, so you can predict exactly what a referral pays.
The [Refer Program terms](https://affitor.com/legal/refer-program) are the rules. This page walks through them with examples, so you can predict exactly what a referral pays.

## The three rewards

Expand All @@ -15,7 +15,7 @@ The [Refer Program terms](/docs/partners/refer-program) are the rules. This page
| Growth bonus | **$350** | The brand pays its first platform fee on a program with $10,000 in tracked sales | Once per referred brand |
| Revenue share | **15%** of Affitor's platform fee | Every platform-fee invoice the brand pays | For 12 months from the first platform-fee invoice the brand pays |

Rewards are counted per referred brand, which is the person you brought to Affitor, not per program. Each reward is held for the hold period (30 days today) before it reaches your balance (terms, [section 6](/docs/partners/refer-program#6-holds-and-payouts)).
Rewards are counted per referred brand, which is the person you brought to Affitor, not per program. Each reward is held for the hold period (30 days today) before it reaches your balance (terms, [section 6](https://affitor.com/legal/refer-program#holds-and-payouts)).

## Example: one brand, several programs

Expand All @@ -41,17 +41,17 @@ Credit belongs to the person you referred, who created the brand. When Minh invi
- **Last click wins.** If several partners' links were clicked, the partner whose link was clicked last before the person signed up earns the rewards. If they signed up without a link (for example as a partner first), the last link clicked before they create their first program counts.
- **30 days.** A click counts for 30 days: the sign-up, or the first program when there was no link at sign-up, has to happen within 30 days of it.
- **One brand, one partner.** Once a brand is credited to you, that does not change.
- **No self-referrals.** Your own link used for your own brand earns nothing (terms, [section 5](/docs/partners/refer-program#5-self-referrals)).
- **No self-referrals.** Your own link used for your own brand earns nothing (terms, [section 5](https://affitor.com/legal/refer-program#self-referrals)).

## What never earns

- A brand that was already on Affitor, adding another program.
- Inviting a partner or a team member to a program. Only your Refer a brand link earns.
- Your own brand: a self-referral (terms, [section 5](/docs/partners/refer-program#5-self-referrals)).
- Your own brand: a self-referral (terms, [section 5](https://affitor.com/legal/refer-program#self-referrals)).

<NextStep
title="Read the Refer Program terms"
description="The official rules behind these examples: attribution, holds, clawbacks and promotion rules."
href="/docs/partners/refer-program"
href="https://affitor.com/legal/refer-program"
ctaLabel="Read the terms"
/>
4 changes: 4 additions & 0 deletions scripts/check-docs-host-http.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ const ALWAYS = [
[PROXY, '/changelog/rss.xml', 200, null, 'application/rss+xml'],
[PROXY, '/changelog/no-such-entry', 404, null],
[PROXY, '/docs/changelog', 301, 'https://affitor.com/changelog'],
// The Refer Program terms moved to affitor.com/legal/refer-program (16/10/2026).
[PROXY, '/docs/partners/refer-program', 301, 'https://affitor.com/legal/refer-program'],
[PROXY, '/docs/partners/refer-program.md', 301, 'https://affitor.com/legal/refer-program'],
[DOCS, '/partners/refer-program', 301, 'https://affitor.com/legal/refer-program'],
[PROXY, '/docs/changelog.md', 301, 'https://affitor.com/changelog.md'],
[PROXY, '/docs/changelog/invite-partners/invite-compose.png', 200, null, 'image/png'],
[PROXY, '/docs', 200, null, 'text/html'],
Expand Down
9 changes: 9 additions & 0 deletions scripts/check-docs-host.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ function invariants() {
['/changelog/rss.xml', 'https://affitor.com/changelog/rss.xml'],
['/docs/changelog', 'https://affitor.com/changelog'],
['/docs/changelog.md', 'https://affitor.com/changelog.md'],
['/partners/refer-program', 'https://affitor.com/legal/refer-program'],
['/partners/refer-program.md', 'https://affitor.com/legal/refer-program'],
['/docs/partners/refer-program', 'https://affitor.com/legal/refer-program'],
]) check(`docs host ${path} -> 301 ${location}`, redirects(DOCS, path, location));
// Files that moved under /docs: served in place with a canonical Link.
for (const [path, internal] of [
Expand Down Expand Up @@ -157,6 +160,12 @@ function invariants() {
// The old docs changelog moved to the zone: absolute, permanent, on every host.
check(`${host}/docs/changelog -> 301 affitor.com/changelog`, redirects(host, '/docs/changelog', 'https://affitor.com/changelog'));
check(`${host}/docs/changelog.md -> 301 affitor.com/changelog.md`, redirects(host, '/docs/changelog.md', 'https://affitor.com/changelog.md'));
// The Refer Program terms left the docs for affitor.com/legal (one copy), twin included.
for (const path of ['/docs/partners/refer-program', '/docs/partners/refer-program.md', '/docs/partners/refer-program?x=1']) {
const query = path.includes('?') ? '?x=1' : '';
check(`${host}${path.replace('?x=1', '')} -> 301 affitor.com/legal/refer-program${query}`, redirects(host, path, `https://affitor.com/legal/refer-program${query}`));
}
check(`${host}/docs/partners/referral-rewards is not moved`, passes(host, '/docs/partners/referral-rewards'));
for (const path of ['/changelog', '/changelog/invite-partners', '/changelog.md', '/changelog/invite-partners.md', '/changelog/rss.xml', '/docs/changelog/invite-partners/invite-compose.png']) {
check(`${host}${path} is served by the changelog zone (no redirect)`, passes(host, path));
}
Expand Down
16 changes: 14 additions & 2 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ export function changelogMove(path: string, host: string | null): string | null
return null;
}

// Pages that left the docs for another affitor.com page: absolute and permanent on every host,
// the .md twin included (the dashboard has no twins, so it lands on the page). The Refer Program
// terms have one copy at /legal/refer-program since 16/10/2026 (dashboard src/content/legal).
const MOVED_OUT: Record<string, string> = {
'/docs/partners/refer-program': 'https://affitor.com/legal/refer-program',
};

export function movedOut(path: string, host: string | null): string | null {
const page = path.replace(/(?:\.md|\/)$/, '');
return MOVED_OUT[host === DOCS_HOST && !/^\/docs(?:\/|$)/.test(page) ? `/docs${page}` : page] ?? null;
}

/** The current path for a renamed page or its .md twin, or null when nothing changed. */
export function currentPath(path: string): string | null {
const md = path.endsWith('.md');
Expand Down Expand Up @@ -140,8 +152,8 @@ export function middleware(req: NextRequest, event: NextFetchEvent) {
}

const host = req.headers.get('host');
const changelog = changelogMove(req.nextUrl.pathname, host);
if (changelog) return NextResponse.redirect(`${changelog}${req.nextUrl.search}`, 301);
const elsewhere = changelogMove(req.nextUrl.pathname, host) ?? movedOut(req.nextUrl.pathname, host);
if (elsewhere) return NextResponse.redirect(`${elsewhere}${req.nextUrl.search}`, 301);

if (host === DOCS_HOST) return docsHost(req);

Expand Down
Loading