Skip to content

Amounts & precision

The Settlement API uses different representations for fiat (minor units) and crypto (decimal numbers). Understanding this is essential to avoid off-by-decimal bugs.

Rules

  • source_amount and expected_source_amount are integers in minor units.
  • Fiat currencies follow ISO 4217 minor units (e.g., KES has 2 decimals).
  • Crypto amounts follow the token's on-chain decimals (e.g., USDT has 6 decimals on Polygon).
  • destination_amount and platform_fee are decimal numbers; clients should accept up to the destination currency's decimal precision.
  • exchange_rate is a decimal number with up to 8 decimal places.
  • Trailing zeros may be omitted (e.g., 1.5 and 1.500000 are equivalent).

Examples

Currency Decimals Example
KES 2 100000 = 1,000.00 KES
USDT 6 1.5 = 1.500000 USDT

Gross vs. net

Bitlipa distinguishes between the gross source amount it expects to receive and the net destination amount delivered to the wallet:

  • source_amount / expected_source_amountgross amount Bitlipa receives.
  • destination_amountnet amount delivered to the wallet (after platform_fee deduction).
destination_amount = (expected_source_amount × exchange_rate) − platform_fee

platform_fee is denominated in the destination currency

The fee is a fixed amount in the destination currency (e.g., USDT). It can vary per merchant and chain.

Fulfillment

Value Meaning
full expected_source_amount equals the requested source_amount.
partial expected_source_amount is less than requested due to liquidity constraints. Present to the merchant for acceptance.
none Settlement cannot be fulfilled.