HyoNovaDocumentation

Money handling

How HyoNova represents and converts money — integer minor units with an ISO 4217 currency, string arithmetic for provider decimals, rounding rules, and no currency conversion.

Requires setupBuilt, but works only after a supporting service is configured for your workspace.ReferenceFor: Developers, IT & securityLast updated: Introduced:
On this page

A payment method appears only after HyoNova has set up its payment provider.

A binary floating-point number never decides how much a customer pays. Every amount in HyoNova Commerce is an integer number of the currency's minor units together with its ISO 4217 currency code.

Representation#

WhereForm
Databasebigint minor units and a three-letter currency
Inside the serverbigint
APIA decimal string of minor units and the currency, for example { "amount": "1495", "currency": "USD" } = 14.95 USD

Currency exponents#

Most currencies have 2 decimal places. HyoNova lists the exceptions explicitly:

ExponentCurrencies
0BIF, CLP, DJF, GNF, ISK, JPY, KMF, KRW, PYG, RWF, UGX, UYI, VND, VUV, XAF, XOF, XPF
3BHD, IQD, JOD, KWD, LYD, OMR, TND
4CLF, UYW
2Every other valid code

A code that is not three capital letters is refused (CURRENCY_UNSUPPORTED).

Converting provider amounts#

Some providers send decimal amounts (FastSpring 14.95, Triple-A 10). HyoNova converts them with string arithmetic only:

  • A JSON number is read through its shortest exact decimal form, never through its binary value.
  • "14.95" USD → 1495; 1000 JPY → 1000.
  • An amount with more decimals than the currency allows is refused, not rounded.
  • Amounts sent to a provider are formatted from minor units the same way (1495 → "14.95").

Rounding#

  • Percentages (discounts) are in basis points (2500 = 25%) and round half away from zero.
  • Time-proportional amounts round half away from zero and are used only where policy says so; HyoNova never invents a provider charge. Proration of card plan changes is computed by the provider.
  • Invoice totals always satisfy total = subtotal − discount + tax; the database enforces it, and that the amount paid never exceeds the total.

No currency conversion#

HyoNova never converts between currencies. Prices exist per currency, invoices and payments carry their own currency, a payment must match its invoice currency, and every revenue figure is reported per currency. A settlement fee the provider did not report stays unknown — it is never shown as zero.

↑↓ to navigate · Enter to open · Esc to close