# Referral System

Earn rewards by referring merchants to MakaPay. As an agent, you set a markup on each merchant you refer and earn 90% of that markup on every transaction they process.

***

## How It Works

### Agent Markup Model

When you refer a merchant, you choose a markup rate that gets added to MakaPay's base fee. Your earnings come directly from the markup you set.

```
┌─────────────────────────────────────────────────────────────────┐
│                     Fee Breakdown                               │
│                                                                 │
│  MakaPay base fee:     0.25%                                    │
│  Agent markup:         0.25%, 0.50%, or 0.75% (you choose)      │
│  Network fee:          $0.10 per transaction                    │
│                                                                 │
│  Total merchant fee = 0.25% base + your markup + $0.10          │
└─────────────────────────────────────────────────────────────────┘
```

### Earnings Split

| Recipient     | Share             | Description                          |
| ------------- | ----------------- | ------------------------------------ |
| Agent         | **90%** of markup | Your commission on every transaction |
| Upline/Mentor | **10%** of markup | Goes to whoever referred you         |
| MakaPay       | 0.25% base fee    | Platform's base fee (not shared)     |
| Network       | $0.10 flat        | Processing fee (not shared)          |

If you have no upline, the 10% goes to a MakaPay fallback account.

***

## Markup Options

| Markup Level | Total Merchant Fee | Agent Earns (90%) | Upline Earns (10%) |
| ------------ | ------------------ | ----------------- | ------------------ |
| 0.25%        | 0.50% + $0.10      | 0.225% of tx      | 0.025% of tx       |
| 0.50%        | 0.75% + $0.10      | 0.45% of tx       | 0.05% of tx        |
| 0.75%        | 1.00% + $0.10      | 0.675% of tx      | 0.075% of tx       |

***

## Example Scenarios

### Scenario 1: Full Chain (Agent + Upline)

```
Alice (upline) → referred → Bob (agent) → referred → Charlie (merchant)

Bob set a 0.75% markup on Charlie.

Charlie processes a $1,000 payment:

Total fee:   0.25% base + 0.75% markup + $0.10 = $10.10
Markup pool: $1,000 x 0.75% = $7.50

Distribution:
├── Bob (Agent, 90% of markup):     $7.50 x 90% = $6.75
├── Alice (Upline, 10% of markup):  $7.50 x 10% = $0.75
├── MakaPay (base fee):             $1,000 x 0.25% = $2.50
└── Network (processing fee):       $0.10
```

### Scenario 2: Agent With No Upline

```
Bob (agent, no upline) → referred → Charlie (merchant)

Bob set a 0.50% markup on Charlie.

Charlie processes a $1,000 payment:

Total fee:   0.25% base + 0.50% markup + $0.10 = $7.60
Markup pool: $1,000 x 0.50% = $5.00

Distribution:
├── Bob (Agent, 90% of markup):     $5.00 x 90% = $4.50
├── Fallback (10% of markup):       $5.00 x 10% = $0.50
├── MakaPay (base fee):             $1,000 x 0.25% = $2.50
└── Network (processing fee):       $0.10
```

### Scenario 3: Direct Merchant (No Agent)

```
Charlie signed up directly (no referral code).

Charlie processes a $1,000 payment:

Total fee:   1% + $0.10 = $10.10

Distribution:
├── MakaPay:               $10.00
└── Network:               $0.10
```

***

## Getting Started

### 1. Generate Your Referral Code

1. Go to **Dashboard > Referrals**
2. Click **Generate Referral Code**
3. Your unique 8-character code is created (e.g., `ABC12345`)

Requirement: 5 completed payments with received amount > 0, or admin bypass.

### 2. Share Your Code

Share your referral code or link:

* Direct code: `ABC12345`
* Referral link: `https://app.makapay.io/signup?ref=ABC12345`

### 3. Set Your Markup

When you refer a merchant, choose your markup rate:

* **0.25%** -- Lower fee for the merchant, lower earnings for you
* **0.50%** -- Balanced option
* **0.75%** -- Higher earnings, but merchant pays more (total 1% + $0.10)

***

## Withdrawing Earnings

### How It Works

Agent earnings accumulate off-chain. You can request a payout at any time -- there are no withdrawal windows or monthly cycles.

### Minimum Withdrawal

* **$0.10 USD** per token/chain combination

### Withdrawal Process

1. Go to **Dashboard > Referrals > Withdraw**
2. Enter your wallet address
3. Click **Request Withdrawal**
4. Funds arrive in your wallet

### Fees on Withdrawal

* Gas fees deducted from earnings
* MakaChain: $0.10 flat transfer fee
* Other chains: Variable gas cost

***

## Referral Dashboard

### Earnings Summary

View earnings grouped by token and chain:

| Token | Chain     | Total Earned |
| ----- | --------- | ------------ |
| USDT  | Polygon   | $25.00       |
| USDT  | MakaChain | $8.50        |
| USDC  | Ethereum  | $12.00       |

### My Network

| Merchant  | Markup | Joined | Your Earnings |
| --------- | ------ | ------ | ------------- |
| user\_xxx | 0.75%  | Jan 5  | $15.00        |
| user\_yyy | 0.50%  | Jan 8  | $5.00         |

***

## Rules & Limitations

### One Level of Agent Earnings

* You earn 90% of your markup on merchants you referred
* Your upline earns 10% of your markup
* No earnings beyond this single upline level

### One Code Per Account

* Each user can only apply ONE referral code
* Code must be applied during signup
* Cannot change referral code once applied

### No Self-Referral

* Cannot use your own referral code
* System blocks self-referral attempts

### Fallback When No Upline

When an agent has no upline, the 10% that would go to a mentor is sent to a MakaPay fallback account. The agent still receives their full 90%.

***

## FAQ

### How is the merchant's fee determined?

* **Direct merchants** (no agent referral): Flat 1% + $0.10
* **Agent-referred merchants**: 0.25% base + agent's chosen markup (0.25%, 0.50%, or 0.75%) + $0.10
* **Members**: 0% (special admin-assigned plan)

### What markup should I choose?

It depends on your strategy. A lower markup (0.25%) makes it easier to attract merchants since their total fee is only 0.50% + $0.10. A higher markup (0.75%) maximizes your per-transaction earnings but means the merchant pays the same 1% as direct signups.

### Can I change the markup for a merchant after signup?

Contact support to adjust markup rates for existing merchants.

### How often can I withdraw earnings?

Anytime. There are no withdrawal windows. Earnings accumulate off-chain and you can request a payout whenever your balance meets the minimum ($0.10 per token/chain).

### What happens to old earnings?

Existing earnings from before this update remain unchanged. The new model applies to future payments only.

### What if I was referred by another agent?

You automatically become their "downline." When your referred merchants process payments, your upline (the agent who referred you) earns 10% of your markup. This does not reduce your 90% share.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.makapay.io/features/referral-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
