You must set data-dr-apiKey and the value you pass must be your public API key.
data-dr-currency-selector
You can optionally set data-dr-currency-selector. If you do, a DOM element whose id is the same value as data-dr-currency-selector needs to be on the page.
You can use the optional data-dr-default-country attribute to help determine which country is selected by default when a page loads. By extension, this also determines the selected currency.
The value you pass must be a two-letter Alpha-2 country code as described in the ISO 3166 international standard.
When the page loads and the local pricing script executes, it first looks for the user's country in cookies, next in data-dr-default-country, and then in the browser's default language settings. If those searches aren't successful, your account's base country is used.
Once a value is located, DynamicPricing.js calls to determine that country's default currency. The local pricing selector's drop-down menus display these country and currency values. Additionally, your price elements are denoted in this currency.
Local pricing selector
The local pricing selector allows customers to select a country-currency combination while shopping on your site.
Alternatively, you can override this stylesheet with your own.
Price elements
Each DOM element on your site that displays pricing information must have a data-dr-original-price attribute. These represent your base prices. Ensure the values you pass don't contain a currency symbol or whitespace.
When populating your data-dr-original-price attributes, retrieve data from a price list associated with your account's base country and currency.
To retrieve your base country and currency, pass your public API key in the header of a GET /dynamic-pricing/country-currency request.
Also, depending on your account's tax configurations, make sure that your data-dr-original-price values are either tax-inclusive or tax-exclusive. For details, contact your Digital River representative.
When the local pricing script executes or customers modify currency and/or country in the selector, DynamicPricing.js makes a call to get country-currency specific data, and then checks whether the country is both supported by Digital River and set up to allow variable pricing. If these conditions are met, DynamicPricing.js applies a conversion factor and a rounding function to each data-dr-original-price on the page, implements currency formatting rules, and then displays the converted, formatted value in the DOM element's innerHTML and adds data-dr-converted-price and data-dr-formatted-price to the element's attributes.