> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affixo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-affiliates (two-tier programs)

> Let your affiliates recruit other affiliates and earn an override on their sales.

A sub-affiliate is an affiliate who was recruited by another affiliate in your
program. The recruiter earns a small **override** on every sale their
sub-affiliate makes, paid on top of the sub-affiliate's own commission. Nothing
comes out of the sub-affiliate's share.

It's a way to grow an affiliate army: your best affiliates bring in more
affiliates, and they have a reason to help those people sell.

<Note>
  Sub-affiliates are a **Growth plan** feature. Affixo never holds or moves
  money. Overrides are commissions like any other, paid by you through your
  normal payout run.
</Note>

## How someone becomes a sub-affiliate

There are two ways a new affiliate gets linked to a recruiter.

1. **They sign up through a recruit link.** Every affiliate has a personal
   recruit link that looks like `https://<your portal>/signup?recruiter=<their code>`.
   It opens your affiliate signup page, not your product, so people who have
   never bought anything can join as a sub-affiliate.
2. **They bought first, then joined.** If someone buys through an affiliate's
   link and later signs up as an affiliate with the same email address, they're
   linked to that affiliate automatically.

If both apply, the recruit link wins.

## Turn it on

It takes two steps, both in the merchant admin.

<Steps>
  <Step title="Switch sub-affiliates on">
    Go to **Settings → General → Sub-affiliates** and turn on **Let affiliates
    recruit**. Recruit links only work while this is on.
  </Step>

  <Step title="Set an override on a campaign">
    In the same section, each campaign is listed with its current override.
    Click **Set override** to open that campaign's Rewards step and fill in
    **Level 2 · Recruited affiliates**, either a percentage or a flat amount
    per sale.
  </Step>
</Steps>

Until at least one campaign pays an override, recruiters have nothing to earn,
and the settings page warns you about it.

## How the override is calculated

A percentage override is a share of the sub-affiliate's sale, after any
refunds. A flat override is a fixed amount per sale.

For example, with a 20% commission and a 5% override:

| | Amount |
| - | - |
| Sale by the sub-affiliate | \$100.00 |
| Sub-affiliate's commission (20%) | \$20.00 |
| Recruiter's override (5%) | \$5.00 |

The override follows the sale. A partial refund shrinks it in proportion, a
full refund reverses it, and if the sub-affiliate's own commission is denied,
the override is denied too.

## What affiliates see

When sub-affiliates are on, each affiliate's portal has a **Sub-affiliates**
tab. It shows their recruit link, ready to copy and share, and the people they
have recruited so far.

## Changing a recruiter

Open the affiliate in **Affiliates**, choose **Edit affiliate**, and change
**Parent affiliate (recruiter)**, or set it to no parent. Only admins can do this. Affiliates can't move themselves under
someone else.

## Rules

* **First recruiter wins.** If someone clicks two different recruit links, the
  first one counts.
* **Links are remembered for 60 days.** After that, a newer recruit link can
  take over.
* **No re-parenting.** A recruit link only links someone when their affiliate
  account is created. Existing affiliates are never moved by a link, only by
  an admin.
* **Same program only.** A recruit link from one program never carries into
  another program.
* **Active recruiters only.** A link from an affiliate who isn't active, or
  someone's own link, is ignored. The person still joins your program, just
  without a recruiter.
* **Growth plan.** Turning sub-affiliates on needs the Growth plan or higher.

## Set it up from code

You can manage overrides through the API or an AI assistant instead of the
admin:

* **API:** `GET`, `PUT` and `DELETE /v1/campaigns/{id}/sub-affiliate-rule`
  read, set and remove a campaign's override. See the **API Reference** tab,
  under Campaigns. Setting an override also switches sub-affiliates on for
  your program.
* **MCP:** the `affixo_set_sub_affiliate_rule` and
  `affixo_remove_sub_affiliate_rule` tools do the same from an assistant. See
  [MCP server](/mcp-server).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.