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

# Fees

> Provider, Demat platform, and optional merchant fees on collections, transfers, and NUBAN deposits.

Demat adds payment provider fees and a Demat platform fee on collections (checkout) and transfers (withdrawals), and deducts the provider's deposit fee on inbound dedicated NUBAN credits. Fees are **local NGN only**. Amounts in this API are naira.

## Pass the amount correctly

For **collection** and **transfer**: pass the **business** amount (hold, top up, or payout). Demat adds fees on top.

For **deposit** (NUBAN inbound): pass the **gross** amount the customer transfers in. `netAmount` is what credits the wallet after the provider's deposit fee.

If you already baked fees into `amount` for collection or transfer, Demat still adds fees again. Always quote with `GET /fees` first.

## Fee types

| Fee | Who it is | How it is calculated |
| - | - | - |
| `providerFee` | Payment provider (card, transfer, or NUBAN deposit) | See bands below |
| `platformFee` | Demat | **One quarter** of `providerFee` (`providerFee / 4`). **0 for deposit** |
| `merchantFee` | Optional surcharge you set on escrow or withdrawal | Fixed naira you pass (ignored for deposit) |

`totalFees = providerFee + platformFee + merchantFee`\
Collection and transfer: `chargedAmount = amount + totalFees`, `netAmount = amount`\
Deposit: `chargedAmount = amount` (gross inbound), `netAmount = amount - providerFee`

## Collection (checkout)

Provider fee on the business amount:

* **1.5%** of amount
* Plus **₦100** when amount is **₦2,500 or more**
* Capped at **₦2,000** per charge
* The ₦100 flat fee is **waived** under ₦2,500

### Example: fund a ₦400 hold

1. `providerFee` = round(400 × 1.5%) = **₦6** (no ₦100 flat; under ₦2,500)
2. `platformFee` = 6 / 4 = **₦1.5**
3. `merchantFee` = 0 (unless you set one on the escrow)
4. `chargedAmount` = 400 + 6 + 1.5 = **₦407.5**
5. Checkout initializes for **₦407.5**. After success, the hold or wallet credit is **₦400** (`netAmount`).

Webhook `payment.succeeded` and related events include:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "amount": 400,
  "chargedAmount": 407.5,
  "netAmount": 400,
  "fees": {
    "providerFee": 6,
    "platformFee": 1.5,
    "merchantFee": 0,
    "totalFees": 7.5
  }
}
```

`chargedAmount` is what the payer paid. `netAmount` is what landed on the hold or wallet after fees.

## Transfer (customer withdrawal)

Provider transfer fee bands (Nigeria):

| Amount | Provider fee |
| - | - |
| ≤ ₦5,000 | ₦10 |
| ₦5,001 to ₦50,000 | ₦25 |
| > ₦50,000 | ₦50 |

`platformFee` is still **one quarter** of that provider fee.

### Example: withdraw ₦400 to a bank

1. `providerFee` = **₦10**
2. `platformFee` = 10 / 4 = **₦2.5**
3. Debit from customer available = **₦412.5**
4. Bank receives **₦400**

## Deposit (dedicated NUBAN inbound)

When a customer transfers into their dedicated virtual account, the provider charges a **deposit fee** on the gross amount before funds settle. Escrow credits the wallet with the **net** only (same rule as micropayment).

* **1%** of the gross inbound amount
* Capped at **₦300**
* Demat `platformFee` = **0** (no Demat cut on NUBAN deposits)

Prefer the fee the provider reports on the webhook when present; otherwise use the schedule above.

### Example: transfer ₦500 into a NUBAN

1. Gross inbound = **₦500**
2. `providerFee` = 500 × 1% = **₦5**
3. Wallet credit (`netAmount`) = **₦495**
4. `wallet.credited` meta includes `grossAmount`, `providerFee`, and `netAmount`

## Merchant surcharge

Optional `merchantFee` on `POST /escrows` and `POST /withdrawals`. It is added into `chargedAmount`. When the payment or payout completes, that surcharge credits your **settlement balance**. Ignored for `type=deposit`.

## Quote endpoint

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
GET /fees?amount=400&type=collection
GET /fees?amount=400&type=transfer&merchantFee=10
GET /fees?amount=500&type=deposit
```

Returns the full breakdown before you create an escrow, checkout, withdrawal, or estimate a NUBAN credit.


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