Money and dates
How amounts and timestamps are represented on the wire.
The single biggest "gotcha" with the Axerity API is how money is represented. Get this and the rest is easy.
Money is decimal strings of minor units
Every amount is a string representing minor units of the account's currency:
- USD:
"1234"means $12.34 (cents). - JPY:
"1234"means ¥1,234 (no minor unit). - BHD:
"1234"means 1.234 BHD (three decimal places).
Why strings? Because JavaScript's Number can't hold large integer
amounts safely (loses precision beyond 2⁵³). We send everything as
strings; you wrap them in BigInt (Node) or your language's arbitrary-
precision integer type.
Inputs
When you POST a transaction, the API accepts amounts as either:
- Decimal strings:
"1200.00"(familiar "currency" notation). - Minor-unit strings:
"120000". - Numbers:
1200.00(parsed if precision fits).
The server parses with the org's currency, so "1200.00" for USD
becomes 120000n internally.
Dates
Three flavors:
- Date-only (transaction date):
"YYYY-MM-DD". No time component. - Timestamps: ISO 8601 with explicit offset:
"2026-05-24T14:32:01.000Z". Always UTC in responses. - Filtering:
?from=2026-01-01&to=2026-12-31&as_of=2026-05-24— always ISO date strings.
Don't use floats
Never compute money in floats. Both because of precision and because your code becomes locale-dependent. Pseudocode:
// Bad
const total = parseFloat(line.debit) + parseFloat(line.credit);
// Good
const total = BigInt(line.debit) + BigInt(line.credit);→ Accounts