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

# Money and amounts in the PanoFlow API

> How PanoFlow represents money: Money objects with integer amounts in minor units (kobo) and an ISO 4217 currency, plus fees and basis points.

PanoFlow sends and receives every amount as a `Money` object: an integer in the currency's minor units plus an ISO 4217 currency code. For naira, the minor unit is the kobo, so ₦450,000.00 is `45000000`.

```json theme={null}
{ "amount": 45000000, "currency": "NGN" }
```

## Rules

* `amount` is an integer in minor units (kobo, cents). It is never a decimal and never a string. Its JSON type is `integer` with format `int64`.
* `currency` is an ISO 4217 code, one of `NGN`, `USD`, `GBP`, `EUR`, `GHS` or `KES`.
* Any field that holds money is a `Money` object, never a bare number.
* Fees are `Money` objects too.
* Percentages are integers in basis points: `fee_bps: 50` means 0.5%.

## Currencies

Only `NGN` is live. Requests in another currency return `422 currency_not_enabled` until that currency is enabled. An amount whose currency doesn't match the account it applies to returns `422 currency_mismatch`.

## Converting for display

Divide by 100 to show naira and kobo, and do your arithmetic on the integer values.

```javascript Node.js theme={null}
const amount = { amount: 45000000, currency: "NGN" };

const formatted = new Intl.NumberFormat("en-NG", {
  style: "currency",
  currency: amount.currency,
}).format(amount.amount / 100);
// "₦450,000.00"
```

```python Python theme={null}
from decimal import Decimal

amount = {"amount": 45000000, "currency": "NGN"}

naira = Decimal(amount["amount"]) / 100
print(f"₦{naira:,.2f}")  # ₦450,000.00
```

> [!TIP]
>
> Store amounts as integers in your own systems too. Floating-point arithmetic on money produces rounding errors.


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