Overview
Markets let you segment a single Store into distinct geographic regions, each with its own currency, locale, and set of countries. For example, an international store might define:- North America — USD, English, ships to US and Canada
- Europe — EUR, German, ships to DE, FR, AT, NL
- United Kingdom — GBP, English, ships to GB
Market Attributes
| Attribute | Description | Example |
|---|---|---|
name | Human-readable name, unique per store | North America |
currency | ISO 4217 currency code | USD |
default_locale | Default language for this market | en |
supported_locales | All locales available in this market | ["en", "es"] |
tax_inclusive | Whether prices include tax (affects display and checkout calculation) | false |
default | Whether this is the fallback market when no country match is found | true |
countries | List of countries in this market | [{ iso: "US" }, { iso: "CA" }] |
How Markets Work
When a customer visits your store, their country determines which market applies. The market then sets the currency, locale, and tax behavior for that session.- Customer’s country is detected (from URL, geolocation,
X-Spree-Countryheader, or manual selection) - Spree finds the market containing that country
- The market’s currency and locale become the defaults for the session
- The market’s tax zone determines whether prices are shown with or without tax
Listing Markets
Fetch all markets for the current store, including their countries:Resolving a Market by Country
When you know a customer’s country (e.g., from geolocation or a country picker), resolve which market applies:404 if no market contains that country.
This is useful for building a country switcher — resolve the market to show the customer what currency and language they’ll get.
Countries in a Market
List countries belonging to a specific market. Useful for populating address form dropdowns during checkout:Currency and Locale
Each market defines a currency and set of supported locales. When a market is resolved, its currency and locale become the defaults for the session. You can discover all available currencies and locales (aggregated from all markets) via dedicated endpoints:Tax Behavior
Thetax_inclusive flag on a market controls how prices are displayed and calculated:
tax_inclusive: true(common in Europe) — the price shown to the customer already includes taxtax_inclusive: false(common in the US) — tax is added at checkout on top of the displayed price
Pricing Integration
Markets integrate with the Pricing system, enabling market-specific pricing through Price Lists with a Market Rule. This lets you set different prices for the same product in different markets — beyond just currency conversion. For example, you could price a product at $29.99 in North America and €24.99 in Europe, rather than relying on exchange rate conversion. See Pricing — Price Rules for details on configuring market-specific price lists.Setting Up Markets
Markets are managed in the admin dashboard under Settings → Markets. When you runrails db:seed, Spree automatically creates a default market for each store.
To create markets programmatically:
Related Documentation
- Stores — Multi-store setup and configuration
- Pricing — Price Lists, Price Rules, and the Pricing Context
- Addresses — Countries, States, and Zones
- Localization — Locale, currency, and country headers in API requests
- Translations — Resource and UI translations

