Currency Tutorial
Supported currencies
The Emporix e-commerce system supports all existing currencies.
When creating a tenant on the Emporix Developer Portal, you can choose one of the following currencies:
EUR — Euro
GBP — Pound sterling
NOK — Norwegian krone
USD — United States dollar
What if my business operates in a currency that's not on the list?
If your business operates in a currency that's not listed on the Emporix Developer Portal, you need to perform the following steps:
Choose one of the available currencies and finish creating your tenant.
Get your Emporix API keys from the Emporix Developer Portal.
Change your tenant's currency configuration.
Currency configurations
Currencies are configured both tenant-wide and independently for particular sites.
What's the difference between a tenant's currency configuration and a site's currency configuration?
Currency configured for a particular site needs to be one of the currencies configured for the whole tenant. In other words, your tenant's currency configuration must include all currencies configured for all of the sites.
Currency codes defined in currency configurations must be compliant with the ISO 4217 standard.
Your tenant's currency configuration is stored under the project_curr
key in the Emporix API Configuration Service. Check out the following example:
{
"key": "project_curr",
"value": "[{\"id\":\"EUR\",\"label\":\"Euro\",\"default\":true,\"required\":true},{\"id\":\"GBP\",\"label\":\"Pound sterling\",\"default\":false,\"required\":false}]"
}
Site-specific currency configuration is stored in the currency
field, inside the Site
object. Check out the following example:
{
"currency": "EUR"
}
For more information on the Site
object, check out the Site Settings Service guide
Managing currency configurations through Emporix API
Check out the following tutorials to learn more about currency configuration with Emporix API.
How to check which currencies are configured for your tenant
To retrieve your tenant's currency configuration, you need to send a request to the Retrieving a configuration endpoint.
curl -L \
--url 'https://api.emporix.io/configuration/{tenant}/configurations/{propertyKey}' \
--header 'Accept: */*'
How to change your tenant's currency configuration
To change your tenant's currency configuration, you need to send a request to the Updating a configuration endpoint with updated currency information in the request body.
The id in the request body must be compliant with the ISO 4217 standard.
curl -L \
--request PUT \
--url 'https://api.emporix.io/configuration/{tenant}/configurations/{propertyKey}' \
--header 'Content-Type: application/json' \
--data '{
"key": "project_curr",
"secured": false,
"value": [
{
"id": "PLN",
"label": "Polish zloty",
"default": "true",
"required": "true"
}
"version": 1
}'
How to check which currency is configured for a particular site
To retrieve a particular site's currency configuration, you need to call the Retrieving a site endpoint. The currency configuration will be returned under the currency
field in the response body.
curl -L \
--url 'https://api.emporix.io/site/{tenant}/sites/{siteCode}' \
--header 'Accept: */*'
How to change a particular site's currency configuration
To change a particular site's currency configuration, you need to call the Partially updating a site endpoint with the currency code of your choice in the request body.
The currency code must be compliant with the ISO 4217 standard.
curl -L \
--request PATCH \
--url 'https://api.emporix.io/site/{tenant}/sites/{siteCode}' \
--header 'Content-Type: application/json' \
--data '{
"defaultLanguage": "en"
"currency": "PLN"
}'
Last updated
Was this helpful?