Amount Format
Aprende a construir el campo amount en unidades mínimas según la moneda de tu país y evita cobros con el monto equivocado
Every Kushki ONE Connect endpoint that involves money shares the same amount object. Before you build your first request, you need one rule: amounts are sent as integers, in the currency’s smallest unit.
Never send periods, commas, spaces or any other separator.
Your currency and its decimals
In Chile you operate in Chilean pesos (CLP), which use no decimals.
The conversion rule
The value is sent as it is, with no zeros added.
| To charge | You send |
|---|---|
| 1,244 CLP | 1244 |
| 12,000 CLP | 12000 |
| 15,990 CLP | 15990 |
How the amount adds up
The amount charged is the sum of every field in the amount object.
| Field | What it represents |
|---|---|
subtotal_iva | The portion of the sale subject to tax |
iva | The tax amount on that portion |
subtotal_iva0 | The exempt portion. Use this field alone when the sale has no breakdown |
extra_taxes | Industry-specific taxes: airport_tax, iac, ice, travel_agency. Send 0 when they do not apply |
tip | Tip. Requires the capability enabled in the DMS |
Full example
A retail sale: 15,990 CLP, of which 2,553 is 19% VAT.
| Component | Value | Minor units |
|---|---|---|
subtotal_iva | 13,437 CLP | 13437 |
iva | 2,553 CLP | 2553 |
| Total charged | 15,990 CLP | 15990 |
{"amount": {"iva": 2553,"subtotal_iva": 13437,"subtotal_iva0": 0,"extra_taxes": { "airport_tax": 0, "iac": 0, "ice": 0, "travel_agency": 0 }},"client_transaction_id": "9a8b7c6d-2222-4000-8000-ffeeddccbbaa"}
Sale with no tax breakdown
When you do not itemize taxes, put the whole amount in subtotal_iva0:
{"amount": {"iva": 0,"subtotal_iva": 0,"subtotal_iva0": 11800,"extra_taxes": { "airport_tax": 0, "iac": 0, "ice": 0, "travel_agency": 0 }},"client_transaction_id": "1a2b3c4d-3333-4000-8000-112233445566"}
Convert without losing cents
Pass the value as a string, not as a decimal number: Decimal(12.44) inherits the same binary error you are trying to avoid.
- Javascript
- Python
const DECIMALS = { COP: 2, MXN: 2, PEN: 2, CLP: 0 };function toMinorUnits(value, currency) {const [whole, frac = ""] = String(value).split(".");const exp = DECIMALS[currency];return Number(whole + frac.padEnd(exp, "0").slice(0, exp));}toMinorUnits("12.44", "COP"); // 1244toMinorUnits("1244", "CLP"); // 1244
from decimal import DecimalDECIMALS = {"COP": 2, "MXN": 2, "PEN": 2, "CLP": 0}def to_minor_units(value: str, currency: str) -> int:exp = DECIMALS[currency]return int(Decimal(value).scaleb(exp).to_integral_value())to_minor_units("12.44", "COP") # 1244to_minor_units("1244", "CLP") # 1244
Common mistakes
| Mistake | What happens | How to avoid it |
|---|---|---|
| Sending the amount with decimals | The charge goes out with the wrong amount, or the request is rejected | Convert to minor units before sending |
| Sending the amount as text with separators | Validation error | Strip every separator and send an integer |
| Converting with floating point | One-cent difference on some amounts | Use integers or a decimal type |
| Reusing an amount returned by a webhook | Wrong magnitude | Events return decimals (12000.0); requests carry integers |
If you operate in several markets
This section applies only if your POS system serves merchants in more than one country.
| Currency | Country | Decimals |
|---|---|---|
COP | Colombia | 2 |
MXN | Mexico | 2 |
PEN | Peru | 2 |
CLP | Chile | 0 |
Accept payments with Kushki ONE
With the amount correctly built, review the payment flows: direct sale, pre-authorization, capture, post-tip and void.
Error catalog
Look up the amount validation codes and their recommended corrective actions.
Colombia
Ecuador
Mexico
Peru