AddressConfig
interface AddressConfig {
defaultCountry?: string;
showCountries?: string[];
dontShowStates?: string[];
countries?: { code: string; name: string }[];
enableAutocomplete?: boolean;
}Source: global.ts:1271
How the checkout address form behaves — default country, which countries and states to show, and whether to autocomplete. All fields are optional; sensible defaults are derived from the campaign's shipping countries.
Properties
defaultCountry: string
Fallback country when detected country is not available (Low priority fallback).
Automatic fallback priority:
- United States (US) - if available in shipping countries
- First country in available list - if US not available
- This defaultCountry - only if list is empty (edge case)
Default: ```ts undefined (auto-fallback to US or first available country) ```
Example
"US"showCountries: string[]
Use campaign API's available_shipping_countries instead. Countries are now automatically filtered based on your campaign configuration. This field is kept for backward compatibility only (Priority 3 fallback).
Example
["US", "CA", "GB"]dontShowStates: string[]
Array of state/province codes to hide from dropdowns (e.g., US territories).
Example
["AS", "GU", "PR", "VI"]countries: { code: string; name: string }[]
Custom countries list with full control over code and name. Takes priority over showCountries but not over campaign API countries.
Example
[{ code: "US", name: "United States" }]