facebook_pixelimg
Get in touch

How to Block P.O. Boxes, Bad Addresses & Misused Discount Codes at Shopify Checkout

By Prince Kantariya

Updated: October 27th, 2026

shopify checkout showing a po box error under the address field
Table of Contents
Share

Some orders are a headache before they are even paid for.

The address is a P.O. box your courier refuses. The street line has no house number. One buyer adds 40 units of a limited product to resell. A staff code shows up on a coupon site.

Shopify does not know your shipping limits, stock limits, or discount policy. So these orders go through, and your team cleans up the mess later.

Blockit fixes that at the source. You pick the condition. You write the message. The customer fixes the problem before they pay.

We just shipped a big update. Here is what is new and how to use each part.

Can Shopify Block PO Boxes by Default?

No. Shopify has no built-in setting that blocks P.O. box addresses. Checkout accepts whatever address the customer types.

You have two ways to add the check.

Option 1: Custom code with Shopify Functions. Shopify’s cart and checkout validation Functions run on Shopify’s servers and can stop checkout when a rule fails. They can also attach the error to a field, such as the postal code. The catch: a developer must write and deploy the function (Rust or JavaScript), and custom apps that contain Functions are available only on Shopify Plus.

Option 2: A checkout validation app. An app from the Shopify App Store gives you the rules without code. Shopify lets stores on any plan use public App Store apps that contain Functions, so you don’t need Plus. Blockit is an app built for this job.

How to Block PO Boxes at Shopify Checkout

Here is how to do it with Blockit:

1. Open the Blockit app in Shopify Admin. If you have already installed the app, you can find it in your Shopify Admin under Apps. If not, visit the Shopify App Store and search for Blockit to install it.

install blockit app from the shopify app store

2. Click on Create rule once you have successfully installed the Blockit app.

new feature of blockit app - create rule in shopify admin

3. Pick the Block PO box addresses from the template.

new feature of blockit app - select block po box address from template

4. Edit the message. Example: “We can’t ship to P.O. boxes. Please enter a street address”.

new feature of blockit app - enter checkout custom message

5. Click Create to save and activate the rule.

new feature of blockit app - click create button to save rule

The message shows right under the address field. Your customer sees exactly what to change.

Other Address Checks

Use the same method to block:

  • Addresses with no house or street number
  • Address lines too long for your shipping labels
  • Countries or states you do not ship to
  • Zip codes in the wrong format, or zip codes outside your delivery area
  • Names in non-Latin letters (useful if your courier needs Latin letters)

Contact Detail Checks

A typo in contact details means a failed delivery and a customer you cannot reach.

Blockit can check:

  • The format of the email address
  • The number of digits in the phone number
  • Whether the phone country code matches the shipping country
  • The tax ID, for countries where checkout asks for it (Brazil, Mexico and Spain, for example)

Set Order Limits

Limits work well for limited drops, wholesale minimums, and products sold in packs. You can set:

  • A minimum or maximum quantity per product, variant, SKU, or collection
  • Quantities in multiples only (packs of 6, for example)
  • A minimum or maximum order amount
  • A maximum order weight, such as per shipping country

For example: To stop one customer from buying too much of a product, use the Maximum quantity per product template. Choose the products, enter the limit, and save. For a minimum spend, use the Minimum order amount template.

Who Can Check Out

Some stores only sell to approved buyers. Blockit lets you:

  • Block guest checkout so customers must log in
  • Allow only customers with a tag, such as “wholesale” or “approved”
  • Set a minimum order amount for tagged customers
  • Apply rules to B2B companies and company locations
  • Limit first-time customers (one free sample per customer, for example)

How to Restrict Discount Codes at Shopify Checkout

Discount codes spread fast. A code made for staff or one influencer can land on a coupon site within days.

With Blockit, you reject the code at checkout and show your own reason. The code just does not apply.

These are the rules store owners use most:

  • One code per order: If a customer enters two, the first stays and the rest are rejected.
  • No codes on sale items: Stops customers from stacking a code on top of a lower price.
  • Staff codes for staff only: Any code that starts with “STAFF” works only for customers with your staff tag.
  • Welcome codes for first orders only: The code is rejected for anyone who has ordered before.
  • No codes for B2B buyers: They already get trade pricing.

You can also reject codes based on:

  • Shipping method (no codes with express shipping, for example)
  • Shipping country, state, or zip code
  • Cart attributes
  • Product tags or collections
  • Order amount
  • A date range

The customer sees your message right under the discount code box.

Not Sure Which Rule You Need?

Blockit has 30+ ready-made templates. You do not have to guess which one to use.

Type the problem in your own words in the search box.

For example: Block checkout if items from my knives collection ship to California.

Blockit suggests the rule, the conditions to add, and the values to fill in. When you open the rule, the steps stay on screen as a checklist.

Pro tip: Preview your message before you save. You will see how it looks at checkout. You can also switch any rule on or off from the dashboard, so you can pause a rule without deleting it.

Try Blockit on Your Store

Install Blockit: Checkout Rule from the Shopify App Store. Pick a template and your first rule can be live in a few minutes.

Need a rule we do not have yet? Use the Missing a feature? form inside the app, or contact us. We read every request.


Frequently Asked Questions (FAQ)

How Do I Stop Customers From Stacking Discount Codes on Shopify?

Open Create rule in Blockit, choose a discount code rule set, and reject extra codes. If a customer enters two codes, the first stays and the rest are rejected with your message. You can add conditions too, such as no extra codes on sale items.

How Do I Limit Quantity Per Order on Shopify?

Use the Maximum quantity per product template in Blockit. Choose the products, enter the limit, and save. You can also set limits by variant, SKU, or collection, or only allow quantities in multiples.

How Do I Restrict a Discount Code to Staff Only?

Create a discount code rule for codes that start with “STAFF”, and allow them only for customers with your staff tag. Everyone else sees your message, and the code does not apply. Keep the message short so customers know why it failed.

How Much Does Blockit Cost?

Blockit has a free plan for development stores. The plan starts at $3.99 per month after a 15-day free trial, billed in USD. Both include checkout rules, order limits, discount code rules, and 30+ templates, with live chat and email support.

Does Blockit Work on All Shopify Plans?

Yes. Checkout rules and discount code rules work on Shopify’s paid plans, not just Shopify Plus. You can also use the app for free on a development store to test your rules before going live.

What Does The Customer See When an Order is Blocked?

Your own message. Address messages can show under the field that needs fixing. Other messages show at the top of checkout. Rejected discount codes show your message under the discount code box.

Are Rules Checked Again When the Customer Pays?

Yes. Rules run when the customer reaches checkout and again when they try to pay. A customer cannot skip a rule by changing details at the last step.

Can I Use More Than One Condition in a Rule?

Yes. You can combine conditions, such as a collection and a shipping state. Then choose whether all of them or any of them must match.

What Languages Does Blockit Support?

The Blockit admin is available in English, French, German, Spanish, Italian, Portuguese (Brazil), Japanese, and Dutch.

Popular Post