Currencies
A currency sets how amounts in it are handled, including how VAT amounts are rounded when a price is calculated. Exchange rates between currencies are described in Exchange rates.
Currency properties
| Field | Type | Default | Description |
|---|---|---|---|
code | string | — | ISO 4217 currency code, such as SEK, EUR or USD |
is_active | boolean | true | Whether the currency can be used, both for pricelists and as the currency in which a price query answers |
vat_precision | integer | 2 | The number of decimals VAT amounts are rounded to (0–4) |
VAT precision
vat_precision sets the number of decimals the VAT amount is rounded to when a price is calculated. It is independent of the rounding of the final sales price.
For example, with vat_precision: 2 and a VAT rate of 25%:
NET mode (the price excludes VAT):
- Price excluding VAT: 99.90
- VAT amount: 99.90 x 0.25 = 24.975 → rounded to 24.98
- Price including VAT: 99.90 + 24.98 = 124.88
GROSS mode (the price includes VAT):
- Price including VAT: 124.88
- VAT amount: 124.88 - (124.88 / 1.25) = 24.976 → rounded to 24.98
- Price excluding VAT: 124.88 - 24.98 = 99.90
Recommended values
| Currency | Recommended vat_precision | Reason |
|---|---|---|
| Most currencies (EUR, SEK, USD, GBP, ...) | 2 | Standard subunit (cents, öre) |
| ISK, JPY, KRW | 0 | No subunit in common use |
VAT amounts are always rounded HALF_UP (standard commercial rounding).
Built-in currencies
Every tenant includes EUR and every currency for which the European Central Bank (ECB) publishes a daily exchange rate, so you can create a pricelist in any currency that has a rate. Each one is active, with its English name and the recommended vat_precision: 0 for ISK, JPY and KRW, and 2 for the rest. To list them, call GET /currency.
When the ECB starts publishing a rate for a new currency, the currency is created with its first rate, with its code as its name and a vat_precision of 2. You can rename it like any other currency.
If you change or deactivate a built-in currency, it stays as you left it: it is never overwritten or created again.
Active and inactive currencies
Setting a currency to inactive
Deactivate a currency to stop it from being used. No data is changed.
Response (200):
{
"active": false
}
Setting a currency to active
What happens when a currency is inactive
| Scenario | Behaviour |
|---|---|
| Creating or changing a pricelist in the currency | Refused with 400 Currency is not active |
A price query for prices in the currency (currency_code) | Refused with 400 currency SEK is inactive |
| A price query in another, active currency | Still works: prices on pricelists in the inactive currency are converted as before |
| Reactivating the currency | Everything works again immediately |
Note: Deactivating a currency does not change any data. Its pricelists and their prices stay as they are.
Managing currencies
Create or update a currency
POST /currency
Content-Type: application/json
{
"code": "SEK",
"name": "Swedish Krona",
"is_active": true,
"vat_precision": 2
}
code must be three letters and is stored in upper case. A write replaces the whole currency, and a field you leave out takes its default: true for is_active and 2 for vat_precision. Send every field when you change one; otherwise, changing the name of an inactive currency, for example, also makes it active again. The request returns 202 Accepted on success, and 400 for a code that is not three letters or a vat_precision outside 0–4.
Get a currency
In the response, the active flag is named active; a write sends it as is_active.
Response (200):
{
"code": "SEK",
"name": "Swedish Krona",
"vat_precision": 2,
"active": true,
"updated_at": "2025-01-15T10:00:00Z"
}
List all currencies
Returns every currency, active and inactive.
Activate or deactivate a currency
POST /currency/{code}/active?value=true
POST /currency/{code}/active?value=false
Returns 200 with {"active": true} or {"active": false} on success, and 404 if the currency does not exist.