Wasm file size limit for Shopify Functions when validating addresses

Hi all,

I’m experimenting with Shopify Functions to implement address validation for Japan during checkout. My goal is to validate postal codes along with prefecture/city/town-level data.

Here’s the scenario I tried:

  • I collected Hokkaido prefecture postal codes + city/town data and embedded it as static data inside my Shopify Function.

  • When I tried to deploy, I received the error: Wasm file size must be less than 256 KB

It seems the dataset is too large to fit inside the Shopify Function due to the 256 KB deployment limit.

My questions for the community:

  1. Is there a way to include large datasets in a Function for validation (e.g., .zip or external file)?

  2. How do apps like Simple Address Validator / Checkout Address Validator perform full address validation for non-Plus stores without hitting this limit?

  3. Are there recommended patterns for handling large address datasets while still leveraging Shopify Functions for lightweight checks?

Thanks in advance for any guidance!

Hey @Susan_Kapali - this is a really interesting challenge.

I’d also be curious to hear from anyone in the community who’s tackled similar address validation use cases, but from what I’ve found, there are a couple of potential paths depending on your merchant’s plan.

The most direct solution would be the network access capability for Functions, which lets your Function make HTTP requests to an external service where your dataset lives. The catch is this is currently limited to Shopify for Enterprises (formerly Commerce Components) with custom apps - not available on Plus or lower plans, and not available on dev stores yet.

For Plus merchants, Checkout UI Extensions with the network_access capability could work. You’d build a client-side validation that calls your backend API with the address data, then use useBuyerJourneyIntercept with block_progress to prevent checkout if validation fails. It’s a different architecture (client-side vs server-side), but achieves a similar outcome.

Would love to hear what others have tried here!

Hi @Donal-Shopify

Thanks for the detailed explanation, that aligns with what I’ve been experimenting with.

I’ve already built this using Checkout UI Extensions with network access, and it works well for Shopify Plus stores. The challenge I’m trying to solve is supporting both Plus and non-Plus merchants with the same address-validation behavior.

I explored Shopify Functions for this, since they run during checkout for all plans. However, because Functions can’t call external APIs and have a 256 KB Wasm size limit, embedding Japan postal code + address data quickly exceeds that limit (even at a prefecture level).

This is where I’m a bit stuck: apps like Simple Address Validator / Checkout Address Validator appear to provide address validation for non-Plus stores as well using Shopify Functions.

Any insight into the recommended or supported approach for public apps here would be very helpful. Thanks again!

Hey @Susan_Kapali - thanks for following up!

We can’t speak to exactly how other apps in the App Store achieve their results - they may be using different validation approaches (like format-only checks rather than full dataset lookups), or targeting Plus merchants where Checkout UI extensions with network access open up more options.

For full address validation with large datasets like Japan postal codes, the current constraints are:

  • Functions have a 256 KB Wasm limit and can’t make network calls (except on Enterprise with custom apps)

  • Checkout UI extensions with block_progress require Plus

  • Non-Plus stores don’t have a clean path to server-side validation that blocks checkout

Expanding Checkout UI Extension network access to non-Plus Merchants would really help here - I’ve gone ahead and submitted this as a feature request on your behalf. The more a specific feature is requested by our merchants and partners, the more likely it is to be considered for future implementation by our product teams so appreciate you sharing the limitation you’re facing!