Shipping & customs5 min read

Shopify: Block PO Boxes and Packstations at Checkout

Your courier cannot deliver to PO boxes or Packstations, but Shopify checkout accepts them. What Shopify offers, why hiding rates is not enough, and how to block it.

In this guide
  1. Why these addresses cause trouble
  2. What Shopify does on its own
  3. Hide or block: which one to use
  4. Write the message so the buyer can fix it
  5. Watch the edge cases
  6. Where Livra: Postcode Shipping Rules fits
  7. FAQ

Your courier does not deliver to PO boxes. Or you ship bulky goods that will never fit into a DHL Packstation. Yet a buyer types PO Box 77 or Packstation 123 into the Shopify checkout, pays, and the parcel comes back a week later with return costs on top.

This guide covers what Shopify offers for these addresses, why hiding a rate is not always enough, and two ways to stop the order before it is placed: hiding the options that cannot deliver, or blocking checkout with a clear message.

Why these addresses cause trouble

A PO box is a mailbox at a post office. A parcel locker, such as a DHL Packstation in Germany or an Australia Post Parcel Locker, is a machine that only the national postal service fills. Neither can receive a parcel from a courier that is not part of that postal network, and many lockers have a size limit.

Postal services ask buyers to write these addresses in fixed formats. USPS and Canada Post use PO Box and the number. Deutsche Post uses Packstation or Postfiliale with a number. Australia Post uses GPO Box, Locked Bag, Parcel Locker or Parcel Collect. Those formats are what a rule can look for.

What Shopify does on its own

Shopify has no checkbox in shipping settings that refuses PO boxes or parcel lockers. Its shipping zones are built on countries and regions, and a rate cannot read the street line. What it does offer is a way for apps to customize checkout with Shopify Functions:

  • Delivery customizations can hide, rename or reorder delivery options. Shopify lists “Hide delivery options for PO Box addresses” as a use case (shopify.dev: Delivery Customization Function API).
  • Cart and checkout validation can stop checkout with an error message. Shopify’s own documentation includes an example function that prevents a PO box as the shipping address, and validation covers express checkouts such as Shop Pay, PayPal, Google Pay and Apple Pay (shopify.dev: Cart and Checkout Validation Function API).

You can write a function yourself in a custom app, or use an app that ships one. Either way, the merchant switches it on in Shopify admin.

Hide or block: which one to use

Hide the courier options when some of your methods can deliver to these addresses and others cannot. A buyer with a Packstation address still sees DHL Paket, but not your express courier.

Block checkout when nothing you offer can deliver there. The buyer sees a message on the address field and corrects the address before paying.

There is one Shopify limit to know before you rely on hiding. Shopify says hiding delivery options for PO box addresses is only supported for options from carrier services or third-party shipping apps. With Shopify’s built-in rates, the address data the function needs may not be there (Delivery Customization Function API). If your rates are set up by hand in Settings > Shipping and delivery, test the hide rule on a real checkout, and use Block if it does not catch the address.

Write the message so the buyer can fix it

A blocked checkout is only useful when the buyer knows what to change. Say what you cannot deliver to and what to enter instead, for example: “We can’t deliver to PO boxes or parcel lockers. Please enter a street address.”

Write it in the languages your buyers check out in, and place it on the delivery address, where the buyer is looking.

Watch the edge cases

  • Addresses without a house number. A street without a number is often a typo. In Germany, Austria or the Netherlands every address has one, so you can block it there. Do not do this in the UK or Ireland, where many addresses use a house name.
  • Unusual spellings. A rule reads the words the buyer types. Postbox 77 or a locker number on its own can slip through any text check.
  • Test both lines. Buyers put the PO box in address line 1 or line 2. Check both.

Where Livra: Postcode Shipping Rules fits

Livra: Postcode Shipping Rules is an app that hides, renames or moves delivery options and blocks checkout, with rules that run as Shopify Functions. For these addresses it has an Address line condition.

  • Three address types. PO box matches PO Box, P.O. Box, Post Office Box, GPO Box, Locked Bag, Postfach, Postbus or BP followed by a number. Parcel locker or post office pickup matches Packstation, Postfiliale, Parcel Locker or Parcel Collect followed by a number. No house number matches when neither address line has a digit.
  • Hide or block. Use it in a hide rule, for example to hide options whose title contains Express, or in a block rule that stops checkout with a message in up to seven languages, shown on the delivery address.
  • Simulator. Type Packstation 123 or PO Box 77 into Address line 1 or Address line 2 and see what the buyer would get before the rule goes live.

Limits from Shopify Functions apply: the Address line condition works with hide and block rules only, a hide rule with an address line cannot also check the customer, and hide rules with this condition need the Time and address rules function turned on. Because of Shopify’s PO box caveat above, a block rule is the safer choice with built-in rates. See the app’s page, or our guide to hiding a delivery option for UK postcodes for postcode rules.

FAQ

Can Shopify block PO boxes without an app? Not from shipping settings. You need a Shopify Function, either from an app or in a custom app you build. Shopify’s documentation has an example validation function for exactly this.

Does blocking also work with Shop Pay and Apple Pay? Shopify says cart and checkout validation covers express checkouts such as Shop Pay, PayPal, Google Pay and Apple Pay.

Why does my rule not hide the option for a PO box? If you use Shopify’s built-in rates, the address data may not be available to delivery customizations. Shopify supports PO box hiding for carrier-service and third-party app rates. Use a block rule instead.

Will this stop every PO box? No text check catches every spelling. It catches the formats postal services ask buyers to use, so test the spellings your buyers actually type.