Skip to main content
Money in the BlooBank API is represented as integer minor units. This page explains the model so you never lose a penny to floating-point arithmetic.

The golden rule

Never represent money as a floating-point number. The API sends and receives integers in the smallest unit of the currency. Your code must do the same.
For Brazilian Real (BRL): The conversion is fixed: apiValue = displayValue × 10^decimals.

Two shapes you will encounter

Where money flows in a single direction (a payment-order amount), the API uses a plain integer:
Where money carries richer context (a wallet balance), the API uses the structured Amount object:
Either form represents the same idea — just at different levels of self-description.

The Asset shape

When the API exposes a wallet balance, it accompanies the Amount with an Asset descriptor:
asset.decimals is informational — always trust amount.decimals for the specific value at hand. In practice they will match.

Supported currencies

The Transactions Engine API currently supports: For PIX operations, currency is always BRL.

Three balances, not one

When you query a wallet balance, you receive three amounts:
When deciding whether a new outbound payment can be created, check available, not amount.

Client-side handling

Use BigInt or arbitrary-precision integers

JavaScript:
Python:
Go / Java / Rust: native int64 is more than sufficient — BRL values up to ≈ 92 quadrillion fit.

Never multiply with floats

If you must accept user-typed decimal input, validate it as a string against ^\d+(\.\d{1,2})?$ (for BRL) and convert by digit manipulation, not multiplication.

Display formatting

Always format with the user’s locale on the client side:
The API never returns localized strings. That separation is intentional — the same response can be rendered in any locale.

Next

Wallet balance

Endpoint that returns the three balances and the asset descriptor.

Payments overview

How payment orders consume available and update balances.