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

FieldTypeDescription
enabledbooleanMaster toggle for geo-fencing.
modeenumall (no restriction), allow_list (only listed countries), block_list (all except listed).
countriesstring[]The list of country codes to allow or block, depending on mode.
primaryCountryCodestringYour home country, used as a default and excluded from restrictions in most cases.
enforceOnBrowsingbooleanIf on, restricted visitors see a restriction screen instead of the storefront.
enforceAtCheckoutbooleanIf on, restricted visitors can browse but cannot complete checkout.
detectVisitorByIpbooleanUse edge IP detection (cf-ipcountry / vercel headers) to determine the visitor's country.
restrictionTitlestringHeadline shown on the restriction screen.
restrictionMessagestringBody 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.