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

# Prices in other currencies

> Sell in euros, pounds, yen or any Stripe currency, with one plan priced in several currencies and every invoice, overage line and band in the customer's own.

> **Pro:** $29 a month, or €27 in Europe. 1,000 credits, then $0.02 or €0.02 a credit.

Sell to every market in its own money. Price a whole catalog in euros, give one plan its own currency, or price one plan in several currencies side by side, and each customer is billed in theirs on every invoice.

A catalog's `currency` is the currency every amount in it is in, as an ISO 4217 code in lower case (`usd`, `eur`, `gbp`, `jpy`). Amounts are in that currency's minor units: cents for `usd` and `eur`, whole yen for `jpy`. The `*Cents` field names stay as they are. Stripe Prices, Checkout, invoices, overage, seat and storage lines, and credit packs all use the plan's or the pack's currency.

## The catalog

```json ledger.catalog.json theme={"system"}
{
  "schemaVersion": 1,
  "currency": "eur",
  "features": [{ "id": "generate_image", "name": "Generate an image", "creditCost": 1 }],
  "plans": [
    { "id": "pro", "name": "Pro", "monthlyCredits": 1000, "priceCents": 2900,
      "overageUnitAmountCents": 1 }
  ],
  "addOns": [
    { "id": "credits_300", "name": "300 credits", "type": "credit_pack",
      "creditAmount": 300, "priceCents": 900 }
  ]
}
```

```ts ledger.config.ts theme={"system"}
import { creditPack, defineCatalog, feature, plan } from "integrateledger-cli";

export default defineCatalog({
	features: [feature({ id: "generate_image", name: "Generate an image", creditCost: 1 })],
	plans: [
		plan({
			id: "pro",
			name: "Pro",
			currency: "eur",
			monthlyCredits: 1000,
			priceCents: 2900,
			overageUnitAmountCents: 1,
		}),
	],
	creditPacks: [
		creditPack({ id: "credits_300", name: "300 credits", currency: "eur", creditAmount: 300, priceCents: 900 }),
	],
});
```

"Pro: €29 a month, then €0.01 a credit." A plan or a pack can also set its own `currency`, in the catalog or on `POST /v1/plans`; left out, it's the catalog's. `POST /v1/plans` without one uses the workspace's: the currency of its last catalog publish, `usd` before one. `GET /v1/plans` lists each plan's `currency`.

## One plan in several currencies

`currencyOptions` prices a plan in other currencies beside its own, by code: its price and overage terms in each one's minor units.

```ts ledger.config.ts theme={"system"}
plan({
	id: "pro",
	name: "Pro",
	monthlyCredits: 1000,
	priceCents: 2900,
	overageUnitAmountCents: 2,
	currencyOptions: {
		eur: { priceCents: 2700, overageUnitAmountCents: 2 },
		gbp: { priceCents: 2300, overageUnitAmountCents: 2 },
	},
}),
```

```json ledger.catalog.json theme={"system"}
{ "id": "pro", "name": "Pro", "monthlyCredits": 1000, "priceCents": 2900,
  "overageUnitAmountCents": 2,
  "currencyOptions": {
    "eur": { "priceCents": 2700, "overageUnitAmountCents": 2 },
    "gbp": { "priceCents": 2300, "overageUnitAmountCents": 2 }
  } }
```

| Field | What it sets |
| - | - |
| `priceCents` | The plan's price per billing interval in this currency |
| `overageUnitAmountCents` | The overage rate in this currency, when the plan has overage |
| `overageCapCents` | The overage cap in this currency, when the plan has a cap |
| `overageTiers` | The overage bands in this currency, on the plan's band boundaries, when the plan has [overage tiers](https://docs.integrateledger.com/pricing/tiers.md#overage-tiers) |

Stripe gets one Price with a currency option for each currency, so every customer buys the same plan version.

## Bill a customer in their currency

Attach with `currency` to bill the customer in one of the plan's currencies:

```typescript TypeScript theme={"system"}
const result = await billing.attach({ customerId: "user_123", planId: "pro", currency: "eur" });
```

```python Python theme={"system"}
result = billing.attach(customer_id="user_123", plan_id="pro", currency="eur")
```

```bash cURL theme={"system"}
curl https://api.integrateledger.com/v1/billing/attach \
  -H "Authorization: Bearer $LEDGER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerId": "user_123", "planId": "pro", "currency": "eur"}'
```

The customer's first paid attach sets their currency: attach's `currency`, else the plan's own. Every later bill is in it: Checkout, invoices, overage lines and bands, upgrades and downgrades. [`GET /v1/customers`](https://docs.integrateledger.com/api-reference/customers/get) reports it as `currency`, `null` until the first paid plan.

## Rules

* **A customer bills in one currency.** Once set, every later attach, upgrade and downgrade bills in it. Another `currency` is refused with `409 currency_locked`.
* **The plan needs a price in it.** A plan with no price in the customer's currency, its own or an option, is refused with `400 currency_not_offered`.
* **An option prices what the plan does.** Each option has an overage rate, a cap and bands exactly when the plan does, with the plan's band boundaries (`currency_option_incomplete`). The plan's own currency is its `priceCents`, never an option.
* **Options price the plan's own terms.** A plan whose items have prices or overage prices, or that sells [prepaid units](https://docs.integrateledger.com/pricing/prepaid-quantity.md) or [seat licenses](https://docs.integrateledger.com/pricing/seat-licenses.md), is priced in its own currency (`currency_options_items_not_supported`).
* **A currency change is a new version.** Changing a plan's `currency` or its `currencyOptions` publishes a new [plan version](https://docs.integrateledger.com/billing/plan-versions.md). Current subscribers keep theirs; new subscribers get the new terms.
* **A catalog file names a plan's or pack's `currency` only where it differs from the catalog's.** `ledger push` and `ledger pull` keep it.
* **US dollar extras.** [Auto top-ups](https://docs.integrateledger.com/pricing/top-ups.md), fixed-amount [reward coupons](https://docs.integrateledger.com/billing/discounts.md) and the [Stripe migration](https://docs.integrateledger.com/integrate/migrate-from-stripe.md) bill in US dollars.

## Errors

| Status | `error` | Meaning and fix |
| - | - | - |
| `400` | `currency_not_offered` | The plan has no price in the customer's currency. Give it a `currencyOptions` entry, or attach a plan that has one. |
| `409` | `currency_locked` | The customer's currency is set. Leave `currency` out, or send that currency. |
| `400` | `invalid_catalog`, `invalid_request` | A publish issue starting with `currency_option_incomplete` or `currency_options_items_not_supported`. |

## Related

* [Tax](https://docs.integrateledger.com/billing/tax.md): Stripe Tax on every invoice, in any currency.
* [Plans and items](https://docs.integrateledger.com/concepts/plans-and-items.md): every plan field.
* [Invoices and Stripe](https://docs.integrateledger.com/concepts/invoices-and-stripe.md): what each invoice carries.


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