Skip to main content
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.

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.
Store amounts as integers in your own systems too. Floating-point arithmetic on money produces rounding errors.