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

# Currencies

> Accept payments in multiple currencies with proper decimal formatting

Accept payments in multiple currencies.

## Supported Currencies

<Warning>
  Currency availability depends on your payment processor configuration. Not all currencies are enabled by default. **Contact Ozura support to confirm which currencies are enabled for your account** before accepting payments in a non-USD currency.
</Warning>

Ozura Checkout accepts standard 3-letter currency codes. Common currencies include:

| Code  | Currency          | Symbol |
| :---- | :---------------- | :----- |
| `USD` | US Dollar         | \$     |
| `CAD` | Canadian Dollar   | CA\$   |
| `GBP` | British Pound     | £      |
| `EUR` | Euro              | €      |
| `AUD` | Australian Dollar | A\$    |
| `MXN` | Mexican Peso      | MX\$   |

<Note>
  **Default:** If you don't specify a currency, `USD` is used.
</Note>

## Usage

Specify the currency when creating a session:

```json theme={null}
{
  "merchantId": "your_merchant_id",
  "merchantName": "My Store",
  "amount": "25.00",
  "currency": "GBP",
  "successUrl": "https://mysite.com/success",
  "cancelUrl": "https://mysite.com/cancel",
  "errorUrl": "https://mysite.com/error"
}
```

The checkout page will display prices in the specified currency with the appropriate symbol.

## Amount Format

The amount can be sent as a **string** or **number**:

| Correct                            | Incorrect                                        |
| :--------------------------------- | :----------------------------------------------- |
| `"25.00"`                          | `"$25.00"` (no currency symbols)                 |
| `25.00` or `25`                    | — (any valid number is accepted)                 |
| `"100.50"`, `"100.5"`, or `100.50` | `"100.500"` (more decimals than currency allows) |

<Tip>
  Both `"25.00"` (string) and `25.00` (number) work. Use whichever is more convenient for your code.
</Tip>

## Decimal Precision (Important!)

Different currencies have different decimal precision requirements. The API **rejects** amounts with incorrect decimal places.

### Standard Currencies (2 decimals)

Most currencies use 2 decimal places:

| Currency                     | Valid     | Invalid      |
| :--------------------------- | :-------- | :----------- |
| USD, EUR, GBP, CAD, AUD, MXN | `"99.99"` | `"99.999"` ❌ |

### Zero-Decimal Currencies (no decimals)

Some currencies don't use decimal places at all:

| Currency | Name                      | Valid      | Invalid         |
| :------- | :------------------------ | :--------- | :-------------- |
| `JPY`    | Japanese Yen              | `"1000"`   | `"1000.00"` ❌   |
| `KRW`    | South Korean Won          | `"50000"`  | `"50000.50"` ❌  |
| `VND`    | Vietnamese Dong           | `"100000"` | `"100000.00"` ❌ |
| `BIF`    | Burundian Franc           | `"5000"`   | `"5000.00"` ❌   |
| `CLP`    | Chilean Peso              | `"10000"`  | `"10000.00"` ❌  |
| `GNF`    | Guinean Franc             | `"5000"`   | `"5000.00"` ❌   |
| `ISK`    | Icelandic Króna           | `"1500"`   | `"1500.50"` ❌   |
| `PYG`    | Paraguayan Guaraní        | `"50000"`  | `"50000.00"` ❌  |
| `RWF`    | Rwandan Franc             | `"5000"`   | `"5000.00"` ❌   |
| `UGX`    | Ugandan Shilling          | `"50000"`  | `"50000.00"` ❌  |
| `XAF`    | Central African CFA Franc | `"5000"`   | `"5000.00"` ❌   |
| `XOF`    | West African CFA Franc    | `"5000"`   | `"5000.00"` ❌   |

### Three-Decimal Currencies (3 decimals)

Some Middle Eastern currencies use 3 decimal places:

| Currency | Name            | Valid      | Invalid      |
| :------- | :-------------- | :--------- | :----------- |
| `KWD`    | Kuwaiti Dinar   | `"5.500"`  | `"5.5000"` ❌ |
| `BHD`    | Bahraini Dinar  | `"10.250"` | `"10.25"` ❌  |
| `OMR`    | Omani Rial      | `"25.000"` | `"25.0"` ❌   |
| `IQD`    | Iraqi Dinar     | `"5.500"`  | `"5.5"` ❌    |
| `JOD`    | Jordanian Dinar | `"5.500"`  | `"5.5"` ❌    |
| `LYD`    | Libyan Dinar    | `"5.500"`  | `"5.5"` ❌    |
| `TND`    | Tunisian Dinar  | `"5.500"`  | `"5.5"` ❌    |

### Error Response

If you provide incorrect decimal precision, the API returns:

```json theme={null}
{
  "success": false,
  "error": "Validation failed",
  "details": ["amount has 2 decimal places but JPY only allows 0"]
}
```

### Best Practice

Always check the currency's decimal requirements before creating a session:

* Most currencies: use 2 decimals
* JPY, KRW, VND and other zero-decimal currencies: use 0 decimals (whole numbers only)
* KWD, BHD, OMR, IQD, JOD, LYD, TND: use 3 decimals

## Currency on Success

When the customer completes payment, the currency is included in the success redirect:

```
https://mysite.com/success?transactionId=txn_123&amount=25.00&currency=GBP
```

You can parse this to display the correct currency symbol on your confirmation page.

## Multi-Currency Tips

1. **Let customers choose:** Detect the customer's location and default to their local currency
2. **Display clearly:** Show the currency code alongside the amount on your checkout button
3. **Match expectations:** If your product page shows prices in EUR, create the session in EUR
