# Fee Structure

Understanding MakaPay's fee components and how to optimize your costs.

***

## Fee Components

Every payment may include up to three fee components:

### 1. Platform Fee (Percentage)

Based on your merchant type:

| Merchant Type                 | Fee Percentage |
| ----------------------------- | -------------- |
| Direct merchant               | 1.0%           |
| Agent-referred (0.25% markup) | 0.50%          |
| Agent-referred (0.50% markup) | 0.75%          |
| Agent-referred (0.75% markup) | 1.00%          |
| Member                        | 0%             |

For agent-referred merchants, the total platform fee = 0.25% MakaPay base + agent markup.

### 2. Network Fee (Fixed)

A fixed fee of **$0.10 USD** per transaction.

This fee covers:

* Settlement recording on MakaChain
* Event emission for tracking
* Network infrastructure costs

### 3. Gas Fee (Variable)

Covers the blockchain transaction costs for settling payments.

| Network   | Typical Gas Cost |
| --------- | ---------------- |
| MakaChain | $0.00 (free gas) |
| Polygon   | $0.01 - $0.05    |
| BSC       | $0.05 - $0.15    |
| Ethereum  | $0.50 - $5.00    |

**Note**: Gas fees vary based on network congestion.

***

## Total Fee Calculation

```
Total Fee = Platform Fee + Network Fee + Gas Fee
```

### Example: $100 USDT on Polygon (Direct Merchant, 1%)

| Component         | Amount    |
| ----------------- | --------- |
| Platform Fee (1%) | $1.00     |
| Network Fee       | $0.10     |
| Gas Fee (est.)    | $0.03     |
| **Total Fees**    | **$1.13** |

### Example: $100 USDT on Polygon (Agent-Referred, 0.50% markup)

| Component            | Amount    |
| -------------------- | --------- |
| Platform Fee (0.75%) | $0.75     |
| Network Fee          | $0.10     |
| Gas Fee (est.)       | $0.03     |
| **Total Fees**       | **$0.88** |

### Example: $100 USDT on MakaChain (Direct Merchant, 1%)

| Component         | Amount    |
| ----------------- | --------- |
| Platform Fee (1%) | $1.00     |
| Network Fee       | $0.10     |
| Gas Fee           | $0.00     |
| **Total Fees**    | **$1.10** |

***

## The Three Fee Modes

MakaPay offers three distinct ways to handle fees. Choosing the right mode depends on your business model and customer experience goals.

### Mode 1: Gas Tank Mode (Default)

**Settings**: `gasless: false`, `payerCoversFee: false`

This is the default and premium experience. You pre-fund a Gas Tank with USDT on MakaChain, and all fees are deducted from there. Your customers pay exact prices, and you receive exactly what you asked for.

```
You want: $100 USDT
Customer sends: $100 USDT
You receive: $100 USDT
Gas Tank pays: ~$1.13
```

| Aspect                  | Details                               |
| ----------------------- | ------------------------------------- |
| **Customer experience** | Best - pays exact price shown         |
| **What you receive**    | Exact amount requested                |
| **Requires deposit**    | Yes - USDT on MakaChain               |
| **Best for**            | E-commerce, fixed pricing, premium UX |

**How it works**: When a payment is settled, MakaPay deducts the platform fee, network fee, and gas fee from your Gas Tank balance. The full payment amount is sent directly to your wallet.

***

### Mode 2: Gasless Mode

**Settings**: `gasless: true`, `payerCoversFee: false`

Despite the name "gasless," this mode actually means **"Gas Tank-less"**--you don't need to maintain a Gas Tank balance. Instead, fees are deducted directly from the payment on-chain before it reaches you.

```
You want: $100 USDT
Customer sends: $100 USDT
Fees deducted: ~$1.13
You receive: ~$98.87 USDT
```

| Aspect                  | Details                                          |
| ----------------------- | ------------------------------------------------ |
| **Customer experience** | Good - pays exact price shown                    |
| **What you receive**    | Less than requested (after fee deduction)        |
| **Requires deposit**    | No                                               |
| **Best for**            | Testing, no upfront capital, low-margin products |

**How it works**: The smart contract deducts fees from the payment before forwarding the remainder to your wallet. No Gas Tank interaction needed.

***

### Mode 3: Payer Covers Fee

**Settings**: `payerCoversFee: true` (automatically enables on-chain fee collection)

The fee is added on top of your requested amount. Customers see and pay the total (amount + fees), but you receive exactly what you asked for.

```
You want: $100 USDT
Fees calculated: ~$1.13
Customer sees: $101.13 USDT
Customer sends: $101.13 USDT
You receive: $100 USDT
```

| Aspect                  | Details                                  |
| ----------------------- | ---------------------------------------- |
| **Customer experience** | Transparent - sees fees separately       |
| **What you receive**    | Exact amount requested                   |
| **Requires deposit**    | No                                       |
| **Best for**            | Invoicing, B2B, transparent fee handling |

**How it works**: When creating a payment, the `grossAmount` is calculated as `requestedAmount + totalFees`. The customer sends the gross amount, the smart contract deducts fees, and you receive your exact requested amount.

***

### Fee Mode Comparison

| Mode             | Settings                              | Customer Sends | You Receive | Gas Tank     | Who Bears Fees     |
| ---------------- | ------------------------------------- | -------------- | ----------- | ------------ | ------------------ |
| **Gas Tank**     | gasless: false, payerCoversFee: false | $100           | $100        | Pays \~$1.13 | You (from deposit) |
| **Gasless**      | gasless: true, payerCoversFee: false  | $100           | \~$98.87    | Not used     | You (from payment) |
| **Payer Covers** | payerCoversFee: true                  | \~$101.13      | $100        | Not used     | Customer           |

### Visual Summary

```
┌─────────────────────────────────────────────────────────────────┐
│                    GAS TANK MODE (Default)                      │
│                                                                 │
│  Customer -> Pays $100 -> You get $100 -> Gas Tank pays fees    │
│                                                                 │
│  + Best customer experience                                     │
│  + Predictable receipts                                         │
│  - Requires Gas Tank deposit                                    │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│                    GASLESS MODE                                  │
│                    (Gas Tank-less)                               │
│                                                                 │
│  Customer -> Pays $100 -> Fees deducted -> You get $98.87       │
│                                                                 │
│  + No deposit required                                          │
│  + Simple setup                                                 │
│  - You receive less than requested                              │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│                    PAYER COVERS FEE                              │
│                                                                 │
│  Customer -> Pays $101.13 -> Fees deducted -> You get $100      │
│                                                                 │
│  + You get exact amount                                         │
│  + No deposit required                                          │
│  + Transparent fee handling                                     │
│  - Customer pays more than listed price                         │
└─────────────────────────────────────────────────────────────────┘
```

***

## Choosing the Right Mode

### Gas Tank Mode -- When You Absorb Fees

**Best for:**

* E-commerce with fixed product prices
* Subscription services with advertised rates
* Premium customer experience
* High-volume merchants

**Configuration:**

```json
{
  "gasless": false,
  "payerCoversFee": false
}
```

**Requirement**: Maintain a [Gas Tank](/guides/gas-tank.md) balance on MakaChain.

***

### Gasless Mode -- When You Accept Reduced Receipts

**Best for:**

* Testing and development
* Merchants without upfront capital
* Low-margin products where fee pass-through is acceptable
* Variable pricing where exact amounts don't matter

**Configuration:**

```json
{
  "gasless": true,
  "payerCoversFee": false
}
```

**Important: Stablecoin Requirement**

Gasless mode **only works with stablecoins** (USDT, USDC, DAI, BUSD, TUSD, USDP). If you attempt to use gasless mode with a non-stablecoin token (e.g., WETH, WBTC), MakaPay will automatically convert it to Gas Tank mode (`gasless: false`).

**Why?** Gas fee calculations assume the token is worth $1 USD, which is only accurate for stablecoins. For non-stablecoins, you must use Gas Tank mode by depositing USDT to your Gas Tank.

***

### Payer Covers Fee -- When Customers Pay Fees

**Best for:**

* Invoicing and B2B transactions
* Marketplaces where fee transparency is expected
* Donations and tips
* Situations where adding fees is culturally acceptable

**Configuration:**

```json
{
  "gasless": true,
  "payerCoversFee": true
}
```

***

## Important: Fee Mode Interactions

### `payerCoversFee` Implies On-Chain Collection

When `payerCoversFee: true`, fees are always collected on-chain (the `gasless` setting is effectively true).

**Why?**

* Customer pays `amount + fees`
* Smart contract must deduct fees from payment
* This requires on-chain fee collection
* Gas Tank mode assumes merchant absorbs fees from deposit

```
payerCoversFee: true + gasless: false -> Treated as gasless: true
```

***

## MakaChain Special Handling

MakaChain has unique fee characteristics:

### Free Gas

* No gas fees for transactions
* Only platform fee + network fee apply

### Token Transfer Fee

* Every ERC20 transfer on MakaChain costs $0.10
* This is built into the token contract
* When `payerCoversFee: true`, accounts for 2 transfers = $0.20

### Recommended for Low Fees

Use MakaChain for the lowest total fees:

* No gas costs
* Fast settlement (1-2 seconds)
* Instant finality

***

## Custom Token Fee Calculation

When you accept a [custom token](/guides/custom-tokens.md), the same three fee components apply (platform fee, network fee, gas fee). The only difference is how the fixed-USD fees (network fee and gas fee) are converted to token units.

### Stablecoins vs Custom Tokens

For **stablecoins** (USDT, USDC, etc.), the system assumes 1 token = $1 USD. A $0.10 network fee is simply 0.10 tokens.

For **custom tokens**, the system uses the token's resolved USD price to convert:

```
Fee in token units = Fee in USD / Token Price in USD
```

### Example: Custom Token at $0.05 per Token (Direct Merchant, $100 Payment)

| Component         | USD Value | Token Units      |
| ----------------- | --------- | ---------------- |
| Platform Fee (1%) | $1.00     | 20.00 tokens     |
| Network Fee       | $0.10     | 2.00 tokens      |
| Gas Fee (est.)    | $0.03     | 0.60 tokens      |
| **Total Fees**    | **$1.13** | **22.60 tokens** |

Note that the **platform fee** is a percentage of the requested amount, so it always scales proportionally regardless of token price. The network fee and gas fee are fixed USD amounts that are divided by the token price to get the equivalent number of tokens.

### Price Sources

The token price used for fee conversion is resolved in this order:

1. **Alchemy Prices API** -- automatic, real-time (Ethereum, Polygon, BSC, Base)
2. **TrustedOracle** -- on-chain oracle on MakaChain (by token symbol)
3. **Custom Price USD** -- manually provided by the merchant

If no price is available from any source and the token is not a stablecoin, gasless mode is automatically disabled and the payment falls back to Gas Tank mode.

For full details, see the [Custom Tokens](/guides/custom-tokens.md) guide.

***

## Optimizing Costs

### 1. Use MakaChain

Accept payments on MakaChain to eliminate gas fees:

| Network       | Total Fee (Direct Merchant, $100) |
| ------------- | --------------------------------- |
| Ethereum      | \~$2.00 - $6.00                   |
| Polygon       | \~$1.13                           |
| BSC           | \~$1.20                           |
| **MakaChain** | **$1.10**                         |

### 2. Sign Up Via an Agent

Agent-referred merchants can pay as low as 0.50% + $0.10 (with a 0.25% agent markup), compared to 1% + $0.10 for direct merchants.

### 3. Batch Similar Payments

For multiple small payments, consider:

* Aggregating into larger payments
* Fixed network fee ($0.10) is more impactful on small amounts

### 4. Choose Fee Mode Strategically

* **High-margin products**: Use Gas Tank mode for best UX
* **Low-margin products**: Use gasless mode to avoid deposit management
* **Invoicing**: Use payer covers fee for transparency

***

## First 30 Free Transactions

New accounts receive a permanent promotion:

* **Platform fee waived** for first 30 transactions
* Network fee ($0.10) still applies
* Gas fees still apply

### What's Included

| Fee Component | During Promo   |
| ------------- | -------------- |
| Platform Fee  | $0.00 (waived) |
| Network Fee   | $0.10          |
| Gas Fee       | Normal rates   |

***

## Fee Transparency

### At Payment Creation

The dashboard and API show complete fee breakdown:

```json
{
  "feeBreakdown": {
    "platformFee": "1.00",
    "networkFee": "0.10",
    "gasFee": "0.03",
    "totalFee": "1.13"
  }
}
```

### In Transaction History

All completed payments show:

* Original amount
* Fees deducted
* Net amount received
* Transaction hash for verification

***

## Gas Tank and Payment Recovery

An important consideration when choosing fee modes: **the Gas Tank enables recovery of problematic payments**.

If a customer:

* **Underpays** (sends less than expected)
* **Sends to wrong network** (e.g., Polygon instead of Ethereum)
* **Sends wrong token** (e.g., USDC instead of USDT)

With a Gas Tank balance, you can recover these funds. Without one, they remain stuck.

See [Gas Tank - Handling Payment Errors](/guides/gas-tank.md#handling-payment-errors) for details.

***

## Comparing to Alternatives

### Traditional Crypto Payment Processors

| Provider                                 | Fee               | Gas Handling |
| ---------------------------------------- | ----------------- | ------------ |
| BitPay                                   | 1%                | Included     |
| Coinbase Commerce                        | 1%                | Included     |
| **MakaPay (Direct)**                     | **1% + $0.10**    | **Separate** |
| **MakaPay (Agent-referred, low markup)** | **0.50% + $0.10** | **Separate** |

### Self-Managed Wallets

| Approach              | Monthly Cost (4 chains) |
| --------------------- | ----------------------- |
| Own wallets per chain | \~$95/month in idle gas |
| **MakaPay Gas Tank**  | **\~$30/month**         |

***

## FAQ

### Why is there a network fee?

The $0.10 network fee covers:

* Settlement event recording on MakaChain
* Cross-chain coordination infrastructure
* 24/7 monitoring and settlement services

### Can I avoid gas fees entirely?

Yes, by:

1. Accepting payments only on MakaChain (free gas)
2. Using gasless mode (fees from payment amount)

### How is the gas fee calculated?

Gas fee = Estimated gas units x Current gas price x Native token price

We estimate conservatively to ensure settlement succeeds.

### Do fees change?

* Platform fees are fixed based on your merchant type
* Network fee ($0.10) is fixed
* Gas fees vary with network conditions

### What about refunds?

Fees are non-refundable. When issuing refunds:

* Refund from your wallet directly
* Original fees are not returned

### What happens with overpayments?

If a customer sends more than the expected amount, fees are only charged on the **original expected amount**, not the overpaid amount. The extra funds go to you without additional fees.

***

## Contact

Questions about fees or pricing?

* Email: <billing@makapay.io>
* Dashboard: Use the support chat


---

# 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/guides/fee-structure.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.
