Skip to content

Currency & Amounts

Amounts in the ParaSta API are always integers in the smallest unit of the currency. There are no floats. This avoids rounding errors.

CurrencyDecimals1 unit equals
USDT61000000
USDC61000000
ETH181000000000000000000
SOL91000000000
KRW01

To charge 10 USDT:

{ "amount": 10000000, "currency": "USDT" }

To charge 0.05 ETH:

{ "amount": 50000000000000000, "currency": "ETH" }

Convert to a human-readable string with the helper of your choice. Example:

function format(amount, decimals) {
const s = amount.toString().padStart(decimals + 1, '0');
return `${s.slice(0, -decimals)}.${s.slice(-decimals).replace(/0+$/, '') || '0'}`;
}
format(10000000n, 6); // "10"

When settlement_mode: "krw", ParaSta exchanges the received crypto to KRW at the rate quoted at confirmation time. See Settlement and GET /v1/exchange_rates.