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

# Multicurrency

> Accept payments in your customer's local currency.

# Multicurrency

Khaime converts prices in real-time and routes payments to the optimal gateway for each currency.

## How It Works

1. **Merchant sets a baseline currency** (e.g., USD) — all products are priced in this currency
2. **Customer's currency is detected** via IP geolocation (or manual selection)
3. **Prices are converted** using live exchange rates
4. **Payment is processed** in the customer's currency via the appropriate gateway
5. **Merchant receives payout** in their baseline currency

## Supported Currencies

| Currency           | Code | Symbol |
| ------------------ | ---- | ------ |
| US Dollar          | USD  | \$     |
| Euro               | EUR  | €      |
| British Pound      | GBP  | £      |
| Canadian Dollar    | CAD  | C\$    |
| Australian Dollar  | AUD  | A\$    |
| Nigerian Naira     | NGN  | ₦      |
| Ghanaian Cedi      | GHS  | GH₵    |
| Kenyan Shilling    | KES  | KSh    |
| South African Rand | ZAR  | R      |
| Rwandan Franc      | RWF  | RF     |
| Tanzanian Shilling | TZS  | TSh    |
| Ugandan Shilling   | UGX  | USh    |
| West African CFA   | XOF  | CFA    |

## Exchange Rates

* **Source**: Live mid-market rates
* **Caching**: Rates are cached with volatility-aware TTLs
  * Stable currencies (USD/EUR): 60 minutes
  * Volatile currencies (USD/NGN): 15 minutes
* **Tolerance**: 5% drift tolerance for cross-currency payment validation

## API Usage

### Get converted pricing

```bash theme={null}
curl "https://api.khaime.com/api/v1/partner/pricing/calculate?amount=10000&target_currency=NGN" \
  -H "X-API-Key: pk_sandbox_your_key"
```

### Charge in customer's currency

```bash theme={null}
# Step 1: get the converted amount
curl "https://api.khaime.com/api/v1/partner/pricing/calculate?amount=10000&target_currency=NGN" \
  -H "X-API-Key: pk_sandbox_your_key"
# Returns: { "local": { "amount": 14501000, "currency": "NGN" } }

# Step 2: create the charge
curl -X POST https://api.khaime.com/api/v1/partner/payments/charge \
  -H "X-API-Key: pk_sandbox_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 14501000,
    "currency": "NGN",
    "total_amount": 10000,
    "total_currency": "USD",
    "converted_total_amount": 14501000,
    "converted_total_currency": "NGN",
    "customer": {
      "email": "customer@example.com",
      "country": "NG"
    }
  }'
```

* `amount` / `currency` — what the **customer pays** (already converted)
* `total_amount` / `total_currency` — the merchant's original pricing, inclusive of all fees (shipping, etc.)
* `converted_total_amount` / `converted_total_currency` — your pre-computed conversion result; Khaime cross-validates this against its own calculation (1% tolerance)
