Store setupUpdated 2026-06-01
Geo-fencing & country restrictions
Restrict browsing or checkout to specific countries using allow or block lists.
Geo-fencing lets you control who can browse or buy from your storefront based on their detected country.
Where to find it
Settings → General → Geo-fencing section. It's a dedicated card within the General settings form.
How it works
| Field | Type | Description |
|---|---|---|
| enabled | boolean | Master toggle for geo-fencing. |
| mode | enum | all (no restriction), allow_list (only listed countries), block_list (all except listed). |
| countries | string[] | The list of country codes to allow or block, depending on mode. |
| primaryCountryCode | string | Your home country, used as a default and excluded from restrictions in most cases. |
| enforceOnBrowsing | boolean | If on, restricted visitors see a restriction screen instead of the storefront. |
| enforceAtCheckout | boolean | If on, restricted visitors can browse but cannot complete checkout. |
| detectVisitorByIp | boolean | Use edge IP detection (cf-ipcountry / vercel headers) to determine the visitor's country. |
| restrictionTitle | string | Headline shown on the restriction screen. |
| restrictionMessage | string | Body copy shown on the restriction screen. |
Country detection
When detectVisitorByIp is enabled, Saleporia reads the visitor's country from edge headers (cf-ipcountry or the Vercel geo header). The /visitor-country endpoint exposes this to the storefront client. If headers are unavailable, detection falls back gracefully.
Enforcement points
Browsing enforcement blocks the storefront entirely; checkout enforcement lets visitors see products but blocks order placement. Use checkout enforcement when you want catalog visibility but regional sales limits.