Shopify address validation

Shopify address validation explained: what checkout checks itself, what needs Plus or an app, and how to block addresses without house number or postal code.

Shopify's checkout checks the addresses buyers enter, and it can suggest corrections. It has no setting that makes the house number required, though. This guide covers what checkout does on its own, what needs Shopify Plus or an app, and how a checkout rule blocks an address without a house number.

What checkout checks on its own

CheckWhat it does
Each fieldWhether the field is required, its format and its length. These checks are always on, in every country.
State and postal codeChecks such as matching the state or province and the postal code. If an address fails one, the buyer must correct it before completing checkout. Only stores on Shopify Plus can turn these checks off.
Address suggestionsWith Validate shipping address turned on, checkout shows issues and suggests fixes when Shopify is confident what the buyer meant. Shopify lists 20 countries for this, such as Austria, Switzerland and France, but not Germany. Addresses from other countries are still checked, but may get fewer suggestions.
AutocompleteAddress suggestions as the buyer types, from services such as Google Autocomplete. It's on by default in 23 countries, including Germany, Austria and Switzerland.
Regional address fieldsIn Brazil, Kuwait, Panama, Peru and the Philippines, checkout splits the address into separate fields for the local format. Only Brazil gets a separate building number field. These fields are required, and you can't change that.
After the orderShopify validates the shipping address of each online order and flags issues on the order in your admin, on every plan.

Shopify describes these in its Help Center under address collection preferences and validating addresses in your admin.

Shopify requires a building number only through the regional fields. There's no setting that requires it in other countries. See House number required for what the settings can do instead.

Express checkouts

With Shop Pay, Apple Pay, Google Pay and PayPal, buyers check out with the details saved with their payment method. Some address rules work differently there:

  • The regional address fields aren't shown with some express checkouts, such as Apple Pay. Checkout uses the standard address fields instead.
  • If you make the company name required, Apple Pay and Google Pay buyers must add one in your checkout when their wallet has none. Shop Pay doesn't require it, so Shop Pay orders may arrive without one.
  • A checkout validation function runs for all four, see below.

What needs Shopify Plus or an app

You want toWhat you need
Require or hide address line 2, the company name or the shipping phone numberThe checkout settings
Reword field labels and error messagesThe checkout settings
Block checkout when an address breaks your ruleAn App Store app with a checkout validation function, from the Basic plan up
Show different checkout fields per countryShopify Plus and a checkout app
Use another address autocomplete serviceShopify Plus and an autocomplete app
Turn off the state and postal code checksShopify Plus
Use the address rules in Checkout Blocks, Shopify's own checkout appShopify Plus. Shopify says requiring a street number isn't supported there.
Run a validation function from a custom app built for your storeShopify Plus

For details, see Shopify's Help Center on checkout app availability, checkout form options, Checkout Blocks and its address format validation.

How a checkout validation function blocks

Shopify Functions let apps add their own checks to Shopify's checkout. A cart and checkout validation function runs while the buyer goes through checkout, and apps add it as a checkout rule. You find these rules under Settings → Checkout in Checkout rules.

TopicHow it works
It blocksErrors from a validation function always block checkout. The buyer sees the app's message, for example at address line 1 or the postal code, and can continue once the address passes.
Express checkoutsIt also runs for Shop Pay, PayPal, Google Pay and Apple Pay.
PlansApps from the Shopify App Store with Functions work from the Basic plan up. Only custom apps with Functions need Shopify Plus.
If it failsIf the function can't run, for example because of a timeout, checkout continues without it. A rule with Block checkout if app experiences a problem turned on stops checkout instead.

When address validation doesn't seem to work

  1. Check the setting. Address suggestions need Validate shipping address under Settings → Checkout → Address collection. They work best in the 20 countries Shopify lists.
  2. Give it a moment. Changes to checkout settings can take up to 30 seconds to reach checkout.
  3. Check the rule's status. An app's checkout rule runs only while its status is Active. You find it under Settings → Checkout in Checkout rules.
  4. Check that the order ships. Checkout asks for a shipping address only when at least one item requires shipping. Without one, there's no address to check.
  5. Using Address Validator? See Troubleshooting.

How Address Validator does it

Address Validator is an App Store app that adds this kind of checkout rule. It blocks checkout when the house number or a required postal code is missing:

FeatureWhat it does
House numberCheckout stops when neither address line contains a digit. This applies in every country except 16 where addresses often have none. See House-number check.
Postal codeCheckout stops when the postal code is empty and the country's address format requires one. Where it's optional, you can require it. See Postal codes.
Express checkoutsShop Pay, PayPal, Apple Pay and Google Pay are checked too. If the wallet hasn't shared the address lines yet, the house number is checked when the buyer pays. See Express checkouts.
Parcel lockers and P.O. boxesAddresses such as Packstation or P.O. Box pass without a house number. See Parcel lockers and P.O. boxes.
Buyer messagesThe buyer sees the message at the field, in the checkout's language. You can reword it. See Buyer messages.

The app checks only that these fields are filled in. It doesn't check that the address exists, and Shopify's own checks stay as they are. See How the check works.

You need no code, no theme changes and no Shopify Plus. Read more about address validation for Shopify checkout on the product page, or start with Getting started.

En esta página