Amounts: Major & Minor Units
All amounts in the reconciliation reports are shown in major units by default. This means the value you see is in the main currency unit: dollars, euros, rand, naira, yen, etc. Some reports also include a _minor_units column with the raw integer value for exact arithmetic.
What Are Major and Minor Units?
Every currency has a major unit (what you spend) and a minor unit (the smallest subdivision):
- USD: major unit = dollar, minor unit = cent (1 dollar = 100 cents)
- EUR: major unit = euro, minor unit = cent (1 euro = 100 cents)
- ZAR: major unit = rand, minor unit = cent (1 rand = 100 cents)
- NGN: major unit = naira, minor unit = kobo (1 naira = 100 kobo)
- JPY: major unit = yen, no minor unit (1 yen = 1 yen)
- BHD: major unit = dinar, minor unit = fils (1 dinar = 1000 fils)
Payment systems internally store amounts as integers in the minor unit to avoid floating-point rounding errors. NjiaPay converts these to major units for readability in reports, but also provides the raw minor-unit value when precision matters.
Conversion Table
The conversion from minor to major units depends on the currency's exponent (number of decimal places). Most currencies use 2, but some use 0 or 3:
| Exponent | Divisor | Currencies | 1000 minor units = |
|---|---|---|---|
| 0 (no decimals) | 1 | JPY (Japanese Yen), UGX (Ugandan Shilling), XAF (CFA Franc) | 1000 major units |
| 2 (standard) | 100 | USD, EUR, GBP, ZAR, NGN, AUD, CAD, CHF, NZD, KES, and most others | 10.00 major units |
| 3 (three decimals) | 1000 | BHD (Bahraini Dinar), JOD (Jordanian Dinar), KWD (Kuwaiti Dinar), OMR (Omani Rial) | 1.000 major units |
The formula is:
major_units = minor_units / divisor
Examples by Currency
USD (2 decimals, divisor 100)
| minor_units | major_units | Explanation |
|---|---|---|
| 399 | 3.99 | $3.99 (399 cents) |
| 1000 | 10.00 | $10.00 |
| 4020 | 40.20 | $40.20 |
EUR (2 decimals, divisor 100)
| minor_units | major_units | Explanation |
|---|---|---|
| 1050 | 10.50 | 10.50 EUR |
| 500 | 5.00 | 5.00 EUR |
| 2000 | 20.00 | 20.00 EUR |
ZAR (2 decimals, divisor 100)
| minor_units | major_units | Explanation |
|---|---|---|
| 15000 | 150.00 | R150.00 (15,000 cents) |
| 45 | 0.45 | R0.45 |
| 125000 | 1250.00 | R1,250.00 |
NGN (2 decimals, divisor 100)
| minor_units | major_units | Explanation |
|---|---|---|
| 380000 | 3800.00 | ₦3,800.00 (380,000 kobo) |
| 190000 | 1900.00 | ₦1,900.00 |
| 390000 | 3900.00 | ₦3,900.00 |
JPY (0 decimals, divisor 1)
| minor_units | major_units | Explanation |
|---|---|---|
| 500 | 500 | ¥500 (no subdivision, minor = major) |
| 1000 | 1000 | ¥1,000 |
| 15000 | 15000 | ¥15,000 |
Japanese yen has no subdivision. A minor unit of 500 is simply ¥500. The amount and amount_minor_units columns will always be the same value.
BHD (3 decimals, divisor 1000)
| minor_units | major_units | Explanation |
|---|---|---|
| 1500 | 1.500 | BHD 1.500 (1,500 fils) |
| 3550 | 3.550 | BHD 3.550 |
| 10000 | 10.000 | BHD 10.000 |
Bahraini dinar (and Kuwaiti dinar, Jordanian dinar, Omani rial) use three decimal places. A minor unit of 1500 is BHD 1.500, not BHD 15.00.
When to Use Minor Units vs. Major Units
Use major units (amount, njia_amount, psp_gross_amount, etc.) when:
- Displaying values to humans
- Quick visual inspection of transactions
- Preparing reports for stakeholders
Use minor units (_minor_units columns) when:
- Doing exact arithmetic in spreadsheets (SUMIFS, pivot tables, comparisons)
- Comparing amounts programmatically (avoids floating-point issues like
10.00 != 9.999999999) - Building automated reconciliation workflows
10.000001 instead of 10.0). Minor-unit columns are always integers and safe for exact comparison. When writing formulas that compare amounts, prefer minor-unit columns.How This Affects Break Flags
The break_gross_amount flag in the Successful Payments report compares NjiaPay's amount against the PSP's gross amount. This comparison is done in minor units internally, so floating-point rounding does not cause false breaks.
If you see break_gross_amount = True, it means the actual integer amounts disagree, not just a rounding artifact.
Full Currency List
NjiaPay supports the following currencies in reconciliation. The divisor column shows how minor units convert to major units.
| Currency | Name | Divisor | Exponent |
|---|---|---|---|
| AED | UAE Dirham | 100 | 2 |
| AUD | Australian Dollar | 100 | 2 |
| BDT | Bangladesh Taka | 100 | 2 |
| BHD | Bahraini Dinar | 1000 | 3 |
| BRL | Brazilian Real | 100 | 2 |
| BWP | Botswana Pula | 100 | 2 |
| CAD | Canadian Dollar | 100 | 2 |
| CHF | Swiss Franc | 100 | 2 |
| CNY | Yuan Renminbi | 100 | 2 |
| COP | Colombian Peso | 100 | 2 |
| EGP | Egyptian Pound | 100 | 2 |
| ETB | Ethiopian Birr | 100 | 2 |
| EUR | Euro | 100 | 2 |
| GBP | Pound Sterling | 100 | 2 |
| GHS | Ghanaian Cedi | 100 | 2 |
| INR | Indian Rupee | 100 | 2 |
| JOD | Jordanian Dinar | 1000 | 3 |
| JPY | Japanese Yen | 1 | 0 |
| KES | Kenyan Shilling | 100 | 2 |
| KWD | Kuwaiti Dinar | 1000 | 3 |
| LSL | Lesotho Loti | 100 | 2 |
| MAD | Moroccan Dirham | 100 | 2 |
| MXN | Mexican Peso | 100 | 2 |
| NAD | Namibian Dollar | 100 | 2 |
| NGN | Nigerian Naira | 100 | 2 |
| NZD | New Zealand Dollar | 100 | 2 |
| OMR | Rial Omani | 1000 | 3 |
| PHP | Philippine Peso | 100 | 2 |
| PKR | Pakistan Rupee | 100 | 2 |
| PLN | Polish Zloty | 100 | 2 |
| QAR | Qatari Rial | 100 | 2 |
| SAR | Saudi Riyal | 100 | 2 |
| TRY | Turkish Lira | 100 | 2 |
| TZS | Tanzanian Shilling | 100 | 2 |
| UGX | Uganda Shilling | 1 | 0 |
| USD | US Dollar | 100 | 2 |
| XAF | CFA Franc BEAC | 1 | 0 |
| ZAR | South African Rand | 100 | 2 |
| ZMW | Zambian Kwacha | 100 | 2 |