NEWDiscoverShipGoal– turn cart progress into bigger baskets
All posts

BlockCart

Shopify checkout validation: how to block orders that break your rules

Checkout validation lets you stop an order and show the customer an error before it goes through. Here is what Shopify blocks natively and what needs an app.

Checkout validation is a rule that runs inside Shopify checkout, blocks the order when a condition fails, and shows the customer an error message so they can fix the cart. It uses Shopify Functions, which means the rule runs on Shopify's servers and cannot be bypassed from the theme or by editing the URL.

This is not email verification, phone validation, or address-existence checking. Those confirm that contact details are real. Checkout validation checks what is in the cart, who the buyer is, or where the order ships, and stops it if something breaks your rules.

Last reviewed: November 12, 2026.

The flow looks like this:

Customer adds items → Reaches checkout → Rule checks the order
  ├─ Pass → Place order as normal
  └─ Fail → Error message shown → Customer fixes the cart → Try again

Where checkout rules live in Shopify

Checkout rules appear in Settings → Checkout → Checkout rules. You will not see any rules there until you install an app that provides them. Each rule comes from an app that uses a Shopify validation Function.

There is a safety net: if a rule errors out at runtime, Shopify falls back to Allow all customers to complete checkout so a broken rule does not lock every buyer out.

One plan detail matters here. Public apps built on Functions (like BlockCart) work on any Shopify plan, from Basic to Plus. Custom-app Functions, the kind a developer writes from scratch using the Shopify CLI, require Shopify Plus.

What native Shopify already blocks

Before adding an app, check whether Shopify's own settings already handle the problem.

SettingWhat it blocksLimitation
Markets and shipping zonesOrders to countries or regions you don't ship toNo custom error message; the customer sees a generic "no shipping available"
B2B catalog quantity rulesOrders below a minimum or above a maximum per variant, for company buyersPer variant and unit-based only; does not apply to retail customers
Discount "applies to" settingA discount code from covering products outside its scopeDoes not stop the order; it just excludes items from the discount
Required checkout fieldsCheckout without a phone number or company name, if you require themOnly collects the field; does not validate its content against your rules

Where native stops: there is no built-in way to set a retail minimum order value, block PO boxes, reject specific ZIP codes with a custom message, restrict products to logged-in customers, or prevent discount codes from being used on certain carts. For those, you need a validation app.

Common checkout validation rules

Most checkout rules need an app. The table below maps each rule to what it checks and whether Shopify handles it natively.

RuleExampleNative?What to checkSetup guide
Minimum order valueBlock orders under $50NoCart subtotal or totalSet a minimum order value
Minimum order quantity (MOQ)Require at least 12 unitsNoCart total quantitySet a minimum order quantity
Max quantity per productLimit a product to 3 per orderNoLine item quantityLimit quantity per product
Max order valueCap orders at $5,000NoCart subtotal or totalSet a maximum quantity or order value
Block PO boxesReject PO box shipping addressesNoAddress line 1 textBlock PO boxes
Block countries or ZIP codesNo orders to certain regionsPartially (shipping zones block countries, but with no custom message)Shipping address country, ZIPBlock orders to specific ZIP codes or countries
Restrict products by locationA product ships only within one stateNoProduct + shipping addressRestrict products or collections by location
Members-only productsOnly tagged or logged-in customers can buyNoCustomer tags, login statusOnly let tagged or logged-in customers buy
Stop discount codes on certain productsNo coupon on sale itemsNoDiscount + cart contentsStop discount codes on certain products
B2B/wholesale minimumsCompany buyers must order $500+Partially (B2B catalog rules exist but are per-variant and unit-based)B2B company + cart totalRequire B2B buyers to meet order rules

Choose when the rule runs

Validation rules can fire at different points in the buying process. The timing affects where the customer sees the error.

StageWhen it firesWhat the customer sees
Cart interactionWhile browsing or updating the cart pageError on the cart page (if the theme displays it)
Add to cartWhen the customer adds an itemError near the add-to-cart button (theme dependent)
Checkout interactionWhile the customer fills in checkout fieldsError at the top of checkout or beside a field
Completing the checkoutWhen the customer clicks "Pay now"Error before the order is placed

Keep Completing the checkout turned on. Some themes and express checkout buttons (Shop Pay, Apple Pay, Google Pay) skip the cart page entirely, so a cart-stage-only rule would never fire for those buyers.

For timing details, see Choose when a rule runs: checkout, cart interaction, add to cart.

Write an error message customers can act on

A validation error should tell the customer what went wrong and what to do next.

Good: "Add items to reach the $50 minimum order." Bad: "Your order is invalid."

  • Say the threshold, not the gap. Error messages are fixed text. If you write "add $10 more," that is only true for one specific cart total. Write "Orders must be at least $50" instead.
  • Pick the right placement. Errors can appear at the top of checkout or beside a specific field (like the shipping address). Match placement to the problem.
  • Watch for stacking. If a cart fails two rules, the customer sees two error messages. Make sure they do not contradict each other.

For more on writing messages, see Write a clear error message for customers.

Checkout rules vs payment rules

Blocking an order is not the same as changing which payment methods a customer sees. A checkout rule stops the order entirely. A payment rule lets the order through but hides, reorders, or renames payment options, like removing cash on delivery for international orders.

If you need both, they are separate rule types. See Checkout rules vs payment rules: which one do you need? for help choosing.

How to set up checkout validation without code

BlockCart is a Shopify app built on Functions that handles checkout rules and payment rules without code or theme edits. It works on any Shopify plan.

Conditions you can check include cart totals and quantities, cart contents (products, collections, tags, SKUs), customer details (tags, login status, order count, total spent, email), B2B company and location, discounts, cart and line-item attributes, subscriptions, shipping method, and shipping address fields (country, province, city, ZIP, address line 1).

Conditions combine with AND and OR groups, so you can build rules like "block checkout if the cart is under $50 AND the customer is not tagged VIP."

Each rule has a status: Off, Test, or Live. Test mode lets you verify the rule on a live store using only your tagged account, so real customers are not affected. An active BlockCart subscription is required to create or run rules, including on development stores.

To get started, see Create your first checkout rule.

Test before you rely on it

Before setting a rule to Live, run through these checks:

  1. One checkout that matches the rule (the error should appear).
  2. One checkout that does not match (the order should go through).
  3. A logged-in customer and a guest buyer.
  4. An express checkout button (Shop Pay or Apple Pay).
  5. Each market or currency your store supports.

For more detail, see Test your rules safely before customers see them.

FAQ

What is checkout validation in Shopify?

Checkout validation is a rule that runs during checkout and blocks the order if a condition is not met. The customer sees an error message and can fix the cart before trying again. It uses Shopify Functions, which run server-side and cannot be bypassed from the theme.

Can you add checkout validation on a non-Plus Shopify plan?

Yes, if you use a public app built on Shopify Functions. Public apps like BlockCart work on Basic, Shopify, Advanced, and Plus plans. Custom-app Functions written from scratch with the Shopify CLI require Plus.

Does Shopify have checkout rules built in, or do I need an app?

Shopify blocks orders to unsupported countries through Markets and shipping zones, and has B2B catalog quantity rules for company buyers. But there are no native settings for retail order minimums, PO-box blocking, ZIP-code restrictions with custom messages, or members-only purchase gates. For those, you need an app.

Do checkout validation rules work with express checkout buttons like Shop Pay or Apple Pay?

Rules that fire at the "Completing the checkout" stage run regardless of how the customer enters checkout, including express buttons. Rules that only fire at the cart stage depend on the theme displaying them. Keep completion-stage validation on and test with an express button to be sure.

Can Shopify checkout validation check that an email, phone number, or address is real?

No. Checkout validation checks what is in the cart, who the customer is, and where the order ships. It does not verify that an email address exists, that a phone number is active, or that a street address is deliverable. Those are separate verification services. BlockCart checks address text (country, ZIP, city, address line) but does not confirm the address is real.