Amounts & Precision
Amounts are transported as decimal strings, never as floating-point numbers.
Decimal strings
All monetary amounts in request bodies and response fields are JSON strings, not numbers.
{ "amount": "0.01000000" }This prevents floating-point precision loss in JavaScript clients. Never parse an amount field as a bare number.
Do not use parseFloat() or Number() on amount fields. Parse them with a decimal library (e.g. decimal.js, big.js) or keep them as strings until display time.
Precision
Amounts use 8 decimal places for most cryptocurrencies. Pass the full precision in requests:
"0.00100000" ✓ (1000 satoshi)
"0.001" ✓ (also accepted; trailing zeros optional)
"0.0010000001" ✗ (more than 8 decimal places — validation error)USD nomination
Create Invoice accepts either a direct crypto amount or a fiat-denominated amount that the API converts at the time of creation:
| Mode | Fields |
|---|---|
| Crypto-denominated | currency + amount |
| Fiat-denominated | currency + amount_fiat + fiat_currency |
fiat_currency must be "USD" — it is currently the only supported fiat denomination.
{
"currency": "BTC",
"amount_fiat": "100.00",
"fiat_currency": "USD"
}The invoice response includes both amount (crypto, calculated at creation) and amount_fiat / fiat_currency for the nominated value.
Zero amounts
Zero-amount invoices are not valid. The amount or amount_fiat field must be greater than zero.