> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fexco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Currency precision

> How ISO 4217 minor units apply to DCC amounts in rate requests, transaction files, and merchant boarding.

This page explains how the International Organization for Standardization
(ISO) 4217 minor unit standard determines the precision of amount fields
across DCC integrations. The precision rules differ between rate service
calls and transaction file formats, so it is important to apply the
correct format in each context.

## Decimal places by currency

ISO 4217 uses the concept of minor units to define the number of decimal
places for each currency. For example, EUR has 2 minor units (cents),
JPY has 0 minor units, and KWD has 3 minor units (fils). The following
table lists the decimal places for currencies commonly used in DCC
transactions.

| Currency | Code | Decimal places |
| :- | :- | :- |
| Euro | EUR | 2 |
| US dollar | USD | 2 |
| British pound sterling | GBP | 2 |
| UAE dirham | AED | 2 |
| Malagasy ariary | MGA | 2 |
| Namibian dollar | NAD | 2 |
| Iraqi dinar | IQD | 3 |
| Kuwaiti dinar | KWD | 3 |
| Chilean peso | CLP | 0 |
| Japanese yen | JPY | 0 |
| Ugandan shilling | UGX | 0 |
| Vietnamese dong | VND | 0 |

For currencies not listed above, apply the decimal places defined by
[ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). See
[Currency codes](https://docs.fexco.com/dcc/developer-resources/codes/currency.md) for a full
list of ISO 4217 numeric and alphabetic codes.

## How precision applies in each integration area

The decimal places for a currency affect how amounts are formatted in
different parts of the DCC integration. The rules differ between rate
service responses and transaction file formats.

### Rate service

When you request a rate offer, the rate service response includes the
minor unit count for the cardholder currency. Use this value to determine
how many decimal places to apply when displaying the converted amount to
the cardholder.

> [!NOTE]
>
> For Visa compliance, currencies with 3 minor units are rounded to 2 decimal places in the rate
> offer. See [Currency codes and minor units](https://docs.fexco.com/dcc/developer-resources/codes/currency.md#minor-units) for details.

### XML I-file

In the XML I-file, the `baseAmount` and `transactionAmount` fields must
include a decimal point and use the number of decimal places defined by
ISO 4217 for the currency. The merchant's base currency configured during
boarding determines which precision rules apply to the `baseAmount` field.

For currencies with 0 decimal places (for example, `JPY` or `CLP`), do
not include a decimal point. For all other currencies, include the full
decimal representation.

The following table shows correctly formatted amounts for three example
currencies:

| Currency | Amount | Formatted value |
| :- | :- | :- |
| Euro (`EUR`, 2 decimal places) | 100 | `100.00` |
| Japanese yen (`JPY`, 0 decimal places) | 7,636 | `7636` |
| Iraqi dinar (`IQD`, 3 decimal places) | 125 | `125.000` |

### V-file and I-file

In the V-file and I-file fixed-width formats, amounts are expressed as
unsigned integers in minor units. Do not include a decimal point. Each
amount field is 11 characters wide, right-justified, and zero-padded.
The merchant's base currency configured during boarding determines which
precision rules apply to the base amount field (Segment 1, positions 37 to
47\).

For currencies with 0 decimal places (for example, `JPY` or `CLP`), the
amount must have two zeros appended in the last two positions of the
11-character field. This is because the field format reserves the last
two positions for minor units regardless of currency precision.

The following table shows correctly encoded 11-character amount fields
for a V-file or I-file:

| Currency | Amount | Field value (11 characters) |
| :- | :- | :- |
| Japanese yen (`JPY`, 0 decimal places) | 241,832 | `00024183200` |
| US dollar (`USD`, 2 decimal places) | 124.78 | `00000012478` |
| Kuwaiti dinar (`KWD`, 3 decimal places) | 125.000 | `00000125000` |

## Common precision errors

Incorrect amount precision is one of the most common causes of transaction
rejection. The following table describes common precision errors and how
to resolve them.

| Error | Cause | Resolution |
| :- | :- | :- |
| XML I-file transaction rejected for invalid amount | Amount does not match the ISO 4217 decimal places for the currency (for example, `100` instead of `100.00` for `EUR`). | Apply the decimal places from the table in [Decimal places by currency](#decimal-places-by-currency). Do not include a decimal point for zero-decimal currencies such as `JPY`. |
| V-file or I-file amount field fails validation | Amount includes a decimal point or is not in minor units (for example, `100.00` instead of `00000010000` for `USD`). | Express all V-file and I-file amounts as unsigned integers in minor units without a decimal point. |
| Zero-decimal currency amount is 9 characters instead of 11 | The two trailing zeros are missing from a zero-decimal currency amount in a V-file or I-file (for example, `000241832` instead of `00024183200` for `JPY`). | Append two zeros to zero-decimal currency amounts to fill the last two positions of the 11-character field. |

## Next steps

Use the following resources after reviewing this reference.

* [Currency codes](https://docs.fexco.com/dcc/developer-resources/codes/currency.md): look up
  ISO 4217 numeric and alphabetic currency codes used in transaction
  files and boarding.
* [XML I-file reference](https://docs.fexco.com/dcc/developer-resources/file-formats/xml-i-file.md):
  review amount field specifications for the XML transaction file format.
* [V-file reference](https://docs.fexco.com/dcc/developer-resources/file-formats/v-file.md):
  review segment field specifications for the V-file fixed-width format.
* [I-file reference](https://docs.fexco.com/dcc/developer-resources/file-formats/i-file.md):
  review segment field specifications for the I-file fixed-width format.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.