AutoPostcode
Guide · Shopify

Shopify checkout address validation, done properly

Verify every UK shipping address against Royal Mail PAF before it becomes an order. This guide covers Plus checkout extensions, non-Plus workarounds, and webhook validation.

No card required · Royal Mail PAF-verified data

Trusted UK address intelligence

Plus
checkout UI ext
Webhook
non-Plus path
31M+
PAF addresses
PAF-verified address lookup
Fast REST API & no-code plugins
GDPR-friendly, UK-hosted

To add Shopify checkout address validation, verify the shipping address against Royal Mail PAF before the order ships — on Shopify Plus with a checkout UI extension, or on other plans via an order-created webhook and cart/account validation. AutoPostcode checks each address against ~31M UK delivery points across ~1.8M postcodes, so a passing address is genuinely deliverable.

~31M
UK addresses in PAF
~1.8M
UK postcodes
<1s
typical check

Can I validate inside Shopify's native checkout?

On Shopify Plus, yes — checkout UI extensions let you autocomplete and validate the address as the customer types. On non-Plus plans Shopify locks the checkout, so validate on the cart page, in the customer account, and after the order lands via a webhook.

  • Shopify Plus: checkout UI extension for live validation
  • All plans: orders/create webhook for post-order checks
  • Cart and account address pages for pre-checkout capture
  • Soft-warn and suggest a PAF match instead of hard-blocking

How do I validate an address with the API?

Call AutoPostcode from a server function or your webhook handler — never from the browser:

// Get candidate addresses on your server from a UK postcode.
const res = await fetch(
  "https://autopostcode.com/api/public/lookup?postcode=" +
    encodeURIComponent(order.shipping_address.zip),
  { headers: { "x-api-key": process.env.AUTOPOSTCODE_API_KEY } }
);
if (!res.ok && res.status !== 404) throw new Error("Lookup HTTP " + res.status);
const candidates = res.status === 404 ? [] : await res.json();
// Compare the selected address with candidates and offer manual review.

How do I wire the order webhook?

Subscribe to orders/create and validate the shipping address as orders arrive:

// Your Shopify receiver passes a verified order to this handler.
export async function handler(order) {
  const zip = order.shipping_address?.zip;
  if (!zip || order.shipping_address?.country_code !== "GB") return;
  const r = await fetch("https://autopostcode.com/api/public/lookup?postcode=" + encodeURIComponent(zip), {
    headers: { "x-api-key": process.env.AUTOPOSTCODE_API_KEY },
  });
  if (r.status === 404) return { needsReview: true };
  if (!r.ok) throw new Error("Lookup HTTP " + r.status);
  return { candidates: await r.json() };
}
Always verify the Shopify webhook HMAC signature before trusting the payload, and keep your API key server-side.

Plus extension vs webhook validation

ApproachWhen it runsBest for
Checkout UI extensionAs customer typesShopify Plus
orders/create webhookAfter order placedEvery plan

For search-as-you-type entry, add Shopify address autocomplete, read the broader Shopify address validation overview, and see the address autocomplete API reference.

A modern, UK-first alternative

AutoPostcode uses the same Royal Mail PAF data as Loqate, Fetchify and Ideal Postcodes, with a clean REST API and an affordable per-lookup price — start on a free trial.

Frequently asked questions

How do I validate addresses in a Shopify checkout?

Add a Shopify checkout UI extension or a post-purchase/thank-you step that calls the AutoPostcode API to verify the shipping address against Royal Mail PAF. On Plus, checkout extensions run natively; on other plans, validate on the cart or account address pages and via webhooks after order creation.

Can I validate the address inside Shopify's native checkout?

On Shopify Plus you can use checkout UI extensions to autocomplete and validate the address as the customer types. On non-Plus plans, Shopify locks the core checkout, so validate on the cart page, customer account, or via an order-created webhook.

Does Shopify have an address API I can use?

Shopify exposes address data through its Admin and Storefront APIs, but it does not verify UK deliverability. Pair Shopify's APIs with AutoPostcode's PAF-backed validation to confirm the address is real.

Is the validation data Royal Mail PAF?

Yes. AutoPostcode validates against Royal Mail PAF, covering ~31M UK delivery points across ~1.8M postcodes, so a passing address is genuinely deliverable.

How do I handle a failed validation without blocking the sale?

Warn softly: flag the address, suggest the closest PAF match, and let the customer confirm. Hard-blocking checkout hurts conversion, so use validation to correct rather than obstruct.

How much does Shopify address validation cost?

AutoPostcode is priced per lookup on an affordable UK-first plan, well below legacy providers like Loqate and Ideal Postcodes, and you can start on a free trial.

Price beat guarantee

We'll beat any like-for-like UK address lookup price

Send us your current quote or invoice and we'll come back the same working day with a better price — plus free migration and integration support.

  • Beat any like-for-like UK quote, monthly or annual
  • Free migration + hands-on integration support
  • No setup fees, no lock-in, cancel any time

Ready to get started?

Add Royal Mail PAF-verified UK address lookup to your site in minutes — start free, no card required.