Overview
Geography is central to how Spree handles checkout, pricing, taxes, and shipping. The system works through a chain of related concepts:- Markets group countries into selling regions with their own currency and locale
- Countries and States provide the geographic data for addresses
- Zones group countries or states together to define where tax rates and shipping methods apply
- Addresses tie a customer to a specific location, determining which zones — and therefore which taxes and shipping options — apply to their order
Addresses
An address represents a shipping or billing location. Every order has a shipping address and a billing address, and customers can save multiple addresses in their address book.| Field | Description |
|---|---|
firstname, lastname | Contact name |
address1, address2 | Street address |
city | City |
zipcode | Postal code (not required for all countries) |
phone | Phone number |
company | Company name (optional) |
label | User-facing label like “Home” or “Office” (optional, unique per customer) |
country_iso | Country (ISO alpha-2 code, e.g., US) |
state_abbr | State/province abbreviation (required for some countries, e.g., CA) |
states_required and zipcode_required on each country so your frontend can adapt the form dynamically.
Customer Address Book
Customers can save multiple addresses and set a default for shipping and billing. When a customer completes checkout, the selected addresses are cloned onto the order — so editing an address later doesn’t change past orders.Checkout Addresses
During checkout, you can either reference a saved address by ID or pass a new address inline:Countries
Countries are the foundation of Spree’s geographic system. They connect to Markets, contain states, and belong to zones. Each country includes metadata that drives address form behavior:| Field | Description | Example |
|---|---|---|
iso | ISO 3166-1 alpha-2 code | US |
iso3 | ISO 3166-1 alpha-3 code | USA |
name | Country name | United States |
states_required | Whether the address form should show a state/province picker | true |
zipcode_required | Whether the address form should require a postal code | true |
Which Countries Are Available?
Only countries assigned to a Market are available during checkout. This lets you control exactly where you sell.states_required and zipcode_required fields to build adaptive address forms — show a state picker only when needed, and skip the zipcode field for countries that don’t use them.
States
States (provinces, regions) belong to a country and are used for address validation and zone matching. Countries like the US, Canada, Australia, and India have predefined states — for these countries, customers must select a state from the list rather than typing a name. States are fetched via the country endpoint using?include=states:
state_name field instead of state_abbr.
Zones
Zones group countries or states together for tax and shipping rules. A zone is either country-based or state-based. Examples:- EU VAT (country zone) — Germany, France, Italy, Spain, … → applies EU VAT rates
- California (state zone) — CA → applies California sales tax
- Domestic Shipping (country zone) — US, CA → enables domestic shipping methods
Tax Zones and Markets
Each Market resolves a tax zone from its default country. This means product prices display the correct tax treatment (inclusive or exclusive) before the customer enters an address — just from knowing their market.How It All Fits Together
Here’s how geography flows through a typical checkout:- Customer visits the store — their country is detected (from URL, geolocation, or selection)
- Market resolved — the country maps to a market, which sets the currency and locale
- Products displayed — prices use the market’s currency and tax zone for correct formatting
- Customer enters address — the address form adapts based on
states_requiredandzipcode_required - Zones matched — the shipping address determines which tax rates and shipping methods apply
- Order completed — the address is cloned onto the order for permanent record

