> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# Amounts and precision

Monetary amounts are easily corrupted in transit. Floating point numbers cannot represent most decimal values exactly, and an amount that is rounded or misread by even the smallest fraction can break reconciliation. Mitu follows a consistent set of rules for representing amounts, so every value arrives in your systems exactly as it was intended.

## Representing amounts

#### Send amounts as numbers in requests

When you create a payment link, invoice or plan, send the amount as a number in the currency's main unit, such as `25.00` for twenty five US dollars, never in cents or other minor units.

```json
{ "amount": 25.00, "currency": "USD" }
```

#### Read amounts as decimal strings in responses

Amounts in responses and events are returned as strings, so that no precision is lost on the way to your systems. Parse them with a decimal type, never with a floating point number.

```json
{ "amount": "25.00", "currency": "USD", "amount_paid": "25.000000" }
```

#### Expect the precision of each currency

Amounts in US dollars and naira carry two decimal places. Amounts in USDC carry up to six, which is the precision of USDC itself, so a payment received in USDC can show more decimal places than the price it settled.

#### Compare amounts as decimals

When you reconcile a payment against a record, compare decimal values rather than text, so that `25.00` and `25.000000` are treated as the same amount.

## Precision by currency

| Currency             | Decimal places | Example     |
| -------------------- | -------------- | ----------- |
| US dollar (USD)      | 2              | `25.00`     |
| Nigerian naira (NGN) | 2              | `7500.00`   |
| USDC                 | Up to 6        | `25.000000` |

## Precision practices

1. **Use a decimal type throughout**\
   Store and calculate amounts with a decimal type in your database and code, so values are never altered by conversion.
2. **Never round received amounts**\
   Record the amount exactly as returned, and round only for display.
3. **Reconcile on value, not on formatting**\
   Match payments to records by decimal value and currency, never by comparing formatted text.

Following these rules ensures that the amount a customer was asked to pay, the amount they paid and the amount in your records always agree, to the smallest unit.