docs
  1. SCAYLE Resource Center
  2. Developer Guides
  3. Internationalisation
  4. Currencies

Currencies

General

When providing prices to SCAYLE, every price has a currency (ISO 4217 currency code). The provided prices are shop country agnostic.

Every shop country defined which currency it should use primarily. In the shop frontend only prices of this currency are then being considered and transactions are made in that currency.

There is no currency conversion happening within SCAYLE.

Prices are defined on variant level and contain all information about prices, taxes and validity — upcoming prices can also be defined for automatic future price updates. For a specific variant, there can be multiple prices active at the same time based on the following dimensions:

  • countryCode: The country in which the price is effective.
  • groupKey: Price groups can be used to apply different prices in different shops within the same country (e.g., B2C vs. B2B).
  • promotionKey: The price promotion key can be used to have multiple valid prices for the same country and price group within the same shop at the same time. The Storefront API can be used to retrieve a specific price by sending a request with a defined price promotion key.

The currency (currencyCode) is not part of these dimensions as it must match the respective country.

Price Key

Every new price gets a generated key. This key might change due to certain conditions. For example, when a future price becomes an active price, the key is modified.

Merchant-Specific Prices

You can create prices for a specific merchant by providing its reference key in the merchantReferenceKey field.

Admin API

Add prices to your products

Money makes the world go round – and the same applies to SCAYLE. You need to add prices to sell products. So let’s get down to business.

In SCAYLE prices are defined at the variant level. You must provide prices for each country in all required currencies. If you want to sell a product in two shop countries, you need to import product variant prices for each country in the local currency.

The Admin API provides a specific endpoint for the price import.

Find further details about that endpoint here.

We’ll explain everything you need to know about the basic setup in the following section.

What should I know to create a price via the Admin API?

You have to use the Admin API endpoint /variants/{variantIdentifier}/prices with the POST http method. Additionally, know the variant identifier for the price creation. This can be found in the SCAYLE Panel (Products > Choose one Product ID > Scroll down to variants) or by using the variants endpoint of the Admin API.

The following parameters are mandatory for price creation per variant:

ParameterTypeDetails
priceINTEGERThe current price of the variant for a shop country, in cents.
currencyCodeSTRINGISO 4217 currency code.
countryCodeSTRINGISO 3166 alpha-2 country code.
taxNUMBERTax rate of the country shop.

The variantIdentifier is part of the request URL. All other parameters are part of the request body. The request body must follow this structure:

        {
            "price": 1090,
            "tax": 19.0,
            "countryCode": "DE",
            "currencyCode": "EUR"
        }

Create prices for our Fashion Store

For our Fashion Store, we have to import prices for Switzerland and Germany. That means we need to include two different currencies: CHF and EUR. Therefore, we’ll import variant prices for DE and CH in their respective currencies.

For the product variant ID 3, we need to import 15,90€ and 18,30 CHF as prices. Create two requests by using the price endpoint.

Request 1

        {
            "price": 1590,
            "tax": 19.0,
            "countryCode": "DE",
            "currencyCode": "EUR"
        }

Request 2

        {
            "price": 1830,
            "tax": 7.7,
            "countryCode": "CH",
            "currencyCode": "CHF"
        }

The response will include a lot of information. But don't panic–this is normal. Those are optional parameters that could have been set in the request body or are set automatically (such as "validFrom.") This parameter is set with the current timestamp to define from which date the price should be used. Here you can see a response for the request 1:

{
    "key": "1-1055",
    "price": 1590,
    "oldPrice": null,
    "recommendedRetailPrice": null,
    "buyingPrice": null,
    "tax": 19,
    "countryCode": "DE",
    "currencyCode": "EUR",
    "groupKey": null,
    "promotionKey": null,
    "validFrom": "2023-04-19T15:28:32+00:00",
    "validTo": null
}

Find price information in the SCAYLE Panel

Just go to the product details page (Products > Choose one Product ID).
Scroll down to the end of the page, and there you’ll find an overview of all prices per country:

Prices per country.

Woohoo! Now you know how to create prices and are one step closer to a sellable product. We're just missing one more thing. But we’ll be there in no time.