In the contract, every amount is a decimal string: the MoneyCOP schema ("3500000", "467009.88", "53500.00"). Never a floating-point number.

JSON
{ "amount": "467009.88", "currency": "COP" }

The reason is simple: 0.1 + 0.2 isn’t 0.3 in binary. A float can turn 467009.88 into 467009.87999999995 somewhere along the way (your ORM, your JSON serializer, a spreadsheet), and with money a one-cent difference breaks a reconciliation. A string travels exactly from end to end.

Sending amounts #

Each SDK normalizes whatever you pass it into the same string the Python SDK would send:

SDKAccepted typesRecommended
Pythonstr, int, DecimalDecimal("467009.88") or "467009.88"
JavaScript / TSstring, number, bigintstring for money you didn’t calculate yourself
PHPstring, int, decimal Stringable objects (e.g. brick/math BigDecimal); float is accepted but discouragedstring
.NETAmount, with implicit conversion from string, int, long, decimal (and double, discouraged)decimal or string
Gocompense.Amount (string constant), AmountFromInt, AmountFromRat, AmountFromFloat (discouraged)"467009.88" or AmountFromInt
from decimal import Decimal

client.loans.register_payment("CRD-00123", amount=Decimal("467009.88"),
                              reference="REC-2026-001", channel="CASH")
client.wallet.topups.create(document="1032456789", phone_number="3001234567",
                            carrier="CLARO", amount=20000)          # int works too

Reading amounts #

Responses also carry amounts as strings. The typed models expose them as Money (amount as a string + currency), for example the balance:

from decimal import Decimal

balance = client.wallet.balance("1032456789")
available = Decimal(balance.available.amount)       # never float(...)
print(available, balance.available.currency)

In bodies without a model (dict, JsonObject, array, map[string]any) amounts arrive as the engine’s string. In Go, the SDK decodes with json.Number, so the engine’s numbers keep their exact digits (v.(json.Number).String()).

Some sandbox responses contain numbers

A few sandbox bodies (simulators, monetary allowance) return amounts as JSON numbers (50000.0). Write your code to accept both and always convert to decimal, never to float.

Currency #

The default currency is COP and amounts are expressed in pesos (not cents). Foreign exchange operations (FX) carry the currency explicitly (sell_currency, buy_currency).