Core Concepts
Currencies & Amounts
How Xtopay handles currency and amounts across African markets.
Amount format
All amounts in the Xtopay API are integers in the smallest currency unit — no decimal points.
| Currency | Unit | Example: 50.00 |
|---|---|---|
| GHS (Ghanaian Cedi) | Pesewas (1/100) | 5000 |
| NGN (Nigerian Naira) | Kobo (1/100) | 5000 |
| KES (Kenyan Shilling) | Cents (1/100) | 5000 |
| UGX (Ugandan Shilling) | Shillings (no sub-unit) | 50 |
| XOF (West African CFA franc) | Centimes (1/100) | 5000 |
| ZAR (South African Rand) | Cents (1/100) | 5000 |
| USD | Cents (1/100) | 5000 |
Sending 50 when you mean 50 GHS will charge the customer 0.50 GHS (fifty pesewas). Always work in the smallest unit.
Supported currencies
GHS NGN KES UGX TZS RWF ZAR XOF XAF USD EUR GBPNot all payment methods are available for all currencies. See Payment Methods for the full compatibility matrix.
Currency conversion
Xtopay does not automatically convert currencies. If your customer pays in GHS and you want to record USD, handle the conversion in your application before creating the payment.
Displaying amounts to users
When displaying amounts to your customers, always divide by the minor unit factor and format with the correct locale:
function formatAmount(amount: number, currency: string): string {
return new Intl.NumberFormat("en-GH", {
style: "currency",
currency,
}).format(amount / 100);
}
formatAmount(5000, "GHS"); // "GH₵50.00"
formatAmount(50000, "NGN"); // "₦500.00"