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

# Money and fees

> Amounts, limits and fees.

## Amounts are integers in cents

`150000` is KES 1,500.00. Never send decimals or floats. M-Pesa and SasaPay move **whole shillings** only, so their amounts must be multiples of `100`. Anything else returns `400 invalid_amount`.

| Rule | Error |
| - | - |
| Not a positive whole number of cents | `400 invalid_amount` |
| M-Pesa outside KES 1 to KES 250,000 | `400 invalid_amount` |
| Below the minimum for this kind of payment | `422 amount_below_minimum` |
| Above the per-transaction limit | `422 amount_above_limit` |
| Would exceed the daily limit | `422 daily_limit_reached` |
| Too small to cover the fee | `400 amount_below_fee` |

## Fees

You can see the fee before any money moves:

```bash theme={null}
GET /v1/merchants/{id}/fees/quote?fee_type=payout&amount=500000
```

`GET /v1/merchants/{id}/fees` lists every fee your business pays. These are the fee types:

| `fee_type` | Charged on |
| - | - |
| `merchant_mpesa_payment` | A customer pays you by an M-Pesa, Airtel or T-Kash prompt, a QR code or a pay-link |
| `merchant_wallet_payment` | A customer pays you from their Cloudpay wallet |
| `till_to_main_transfer` | Moving money from a till to your main account |
| `payout` | Paying a phone, bank account, till or paybill |
| `withdrawal` | A settlement to your own verified account |
| `sms` | Each SMS segment sent for you |
| `business_verification` | KYB review |

On a collection, `fee_borne_by` says who pays the fee:

* `merchant`: the payer is charged `amount` and your till receives `net`.
* `payer`: the payer is charged `amount` plus the fee.

On a payout from your Cloudpay balance, the amount and the fee are both held when you create it. Cloudpay keeps them if the rail confirms the payout and releases them if it fails.

## Custody

Each payment shows where the money sits, in `custody`:

| `custody` | Meaning |
| - | - |
| `platform` | Cloudpay holds the money in your ledger accounts. Payouts come from your main balance. |
| `byok` | You brought your own provider keys. Money moves in your own provider account, and Cloudpay records it without holding it. |

## Final means final

Once the rail confirms a payout or settlement, it can't be reversed through Cloudpay. Check the recipient before you send.


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