Skip to content
Store slow, dated, or hard to edit? Request a Store Diagnostic
Running B2B on spreadsheets or email? Plan Your B2B Project
App & Plus Dev

Shopify Functions Explained: What Merchants Can Now Customise Natively

For years, deep checkout customisation on Shopify meant editing checkout.liquid, a fragile, unsupported workaround that Shopify has since deprecated in favour of its standardised Checkout. That left a real gap: merchants with genuinely custom discount logic, shipping rules, or payment method conditions had no supported way to implement them without a full custom checkout build (which, outside Shopify Plus, wasn’t even possible, since standard Shopify checkout couldn’t be customised beyond branding).

Shopify Functions closes that gap. They’re a way to inject custom backend logic into core parts of Shopify’s commerce engine, discounts, shipping, payment methods, and more, without touching the checkout UI itself or building a fully custom checkout. This post explains what Functions actually are, what they replace, and where they genuinely matter for a merchant deciding whether to invest in them.

What Shopify Functions Actually Are

A Shopify Function is a small, specific piece of backend code (written typically in Rust, AssemblyScript, or JavaScript, compiled to WebAssembly) that plugs into a defined extension point in Shopify’s checkout and order processing flow. Rather than rewriting checkout, you write logic that runs at a specific decision point, for example, “given this cart, which discount should apply”, and Shopify’s own checkout UI calls that logic and renders the result using its standard, fast, Shopify-hosted checkout experience.

This is a meaningfully different model to the old checkout.liquid approach, which let you edit the checkout page’s markup directly (and broke constantly with Shopify updates) or a fully custom checkout build (historically Plus-only, and a much bigger undertaking). Functions are narrower in scope but far more stable, because they run inside Shopify’s own infrastructure against a defined API contract that Shopify maintains and versions.

What You Can Actually Customise With Functions

Functions cover several distinct extension points, and it’s worth knowing what each one is actually for rather than treating “Shopify Functions” as one single feature:

Discount Functions

Custom discount logic beyond what Shopify’s native discount engine supports out of the box, for example, tiered discounts based on a combination of customer tags and cart contents, buy-X-get-Y logic with conditions native discounts can’t express, or discounts that factor in data from an external loyalty system via API.

Shipping Functions

Custom shipping rate logic, hiding or reordering shipping methods based on cart contents, applying different rates for specific product combinations, or integrating rate logic that depends on external data (like a 3PL’s live rate feed) beyond what Shopify’s native shipping rules support.

Payment Customisation Functions

Controlling which payment methods are shown, hidden, reordered, or renamed based on cart or customer conditions, for example, hiding a buy-now-pay-later option below a minimum order value, or reordering payment methods for B2B customers versus retail customers.

Delivery Customisation Functions

Adjusting delivery method names, grouping, or availability based on cart contents or destination, useful for stores with mixed inventory types (in-stock vs. made-to-order, for example) that need different delivery messaging per item type.

Cart and Checkout Validation Functions

Enforcing custom rules before checkout can complete, for example, requiring a minimum order quantity for wholesale accounts, or blocking certain product combinations that can’t ship together.

Who Actually Needs Functions

This is the honest part: most stores don’t need custom Functions. Shopify’s native discount, shipping, and payment configuration options cover the majority of common use cases without any custom code. Functions earn their cost when:

  • Your discount or shipping logic depends on conditions Shopify’s native settings genuinely can’t express (not just “it would be nice if,” but “there is no configuration option for this”)
  • You’re running B2B and retail through the same store with materially different checkout rules for each
  • You have external systems (a loyalty platform, a custom pricing engine, a 3PL) that need to influence checkout decisions in real time
  • You previously relied on checkout.liquid scripts that Shopify has deprecated, and need a supported replacement

If none of those apply, spending development budget on custom Functions before you’ve fully explored Shopify’s native discount and shipping configuration is premature. It’s worth a proper audit of what’s actually configurable natively before assuming you need custom code.

A Worked Example: Wholesale Minimum Order Quantities

To make this concrete, consider a store selling both retail and wholesale through one Shopify instance. Wholesale customers need to order in case quantities (multiples of 12, say) with a minimum order value of $500, while retail customers order individual units with no minimum. Shopify’s native settings don’t have a configuration option that conditionally applies quantity rules and minimums based on customer type at checkout, this is exactly the kind of gap a cart/checkout validation Function is built to close. The Function checks the customer’s company account status and cart contents, and blocks checkout completion with a clear message if the wholesale rules aren’t met, without touching anything else about the checkout experience.

Compare that to a simpler case: a store wanting to show a “free shipping over $100” progress bar in cart. That’s a common, well-solved problem with mature apps already available, and building a custom Function for it would be solving an already-solved problem with more effort than necessary.

Functions and Shopify Plus

Functions are available more broadly than Shopify’s old checkout customisation options were (which were largely Plus-exclusive), though the practical reality is that stores complex enough to need custom Functions are very often also running Plus, simply because the business complexity that drives the need for custom checkout logic tends to correlate with the scale Plus is built for, higher order volume, multi-channel operations, B2B alongside retail, or bespoke operational requirements. If you’re evaluating Functions, it’s worth having that conversation alongside a broader look at whether Shopify Plus development makes sense for your store overall, rather than treating Functions as an isolated technical decision.

What Functions Don’t Do

Worth being clear on the boundaries, because “Functions” sometimes gets treated as a catch-all for any checkout customisation:

  • Functions don’t change the visual design of checkout, that’s handled through Shopify’s checkout branding and, on eligible plans, checkout UI extensions (a separate but related capability for adding custom UI elements like banners or upsells at checkout).
  • Functions run server-side against defined inputs and outputs, they’re not a general-purpose scripting layer for arbitrary checkout behaviour.
  • They require genuine development work (usually via Shopify CLI and a proper deployment process), this isn’t a no-code, app-store-install kind of feature for most use cases, though some apps package specific Function use cases (like advanced discounts) as installable, configurable products.

How Functions Fit With Existing Apps

It’s worth noting that Functions and apps aren’t mutually exclusive categories, a growing number of apps in the App Store are themselves built using Functions under the hood, packaged with a configuration UI so merchants can set up advanced discount or shipping logic without writing any code. If your requirement is common enough that an app already offers it through a Function-based app, that’s very often the more sensible path over custom development, you get the benefit of the underlying technology without the build and maintenance cost of writing and hosting your own Function. Custom Function development becomes the right call specifically when your requirement is too particular, or too tied to your own systems and data, for any existing Function-based app to cover.

This is another reason a proper audit of the App Store, searching specifically for apps built on Functions for your use case, not just general keyword searches, is worth doing thoroughly before committing to a custom build.

A Practical Framework for Evaluating Functions

  • [ ] List the specific checkout, discount, shipping, or payment behaviour you need that isn’t currently possible
  • [ ] Confirm it’s genuinely not achievable through native Shopify settings or an existing app
  • [ ] Check whether it maps to one of the defined Function extension points (discount, shipping, payment, delivery, validation), if it doesn’t, a Function isn’t the right tool
  • [ ] Assess whether the complexity justifies custom development versus a workaround or process change
  • [ ] Plan for ongoing maintenance against Shopify’s API versioning, same as any custom app

Testing Functions Properly Before Launch

Because Functions run at the point of checkout, discount calculation, or shipping rate selection, bugs in a live Function have a direct, immediate impact on whether customers can actually complete a purchase, this isn’t a background process where an error quietly fails and gets noticed later. Proper testing before launch should cover the expected cases (the specific discount or shipping logic working as intended), the edge cases (empty carts, mixed product types, customers who don’t meet company account conditions), and genuine failure handling (what happens if an external API the Function depends on times out or returns unexpected data). Testing in a Shopify development store against realistic cart and customer scenarios, before deploying to your live store, is not optional for Function development the way it might be treated as a nice-to-have for a lower-stakes admin tool, a checkout-breaking bug directly costs revenue for every minute it’s live.

FAQ

Do I need Shopify Plus to use Functions?
Functions are available more broadly than the old checkout.liquid customisation was, but complex, multi-Function implementations are most common on Plus stores given the scale and business complexity involved. Availability details are worth confirming directly against your current plan, since Shopify has expanded access over time.

Are Shopify Functions the same as checkout UI extensions?
No. Functions handle backend logic (which discount applies, which shipping rate shows). Checkout UI extensions add front-end elements to checkout, like a banner, upsell, or custom field. They’re complementary, often used together, but solve different problems.

Can I still use checkout.liquid?
Shopify has deprecated checkout.liquid in favour of its standardised checkout experience, and merchants have been migrating away from it. Functions and checkout UI extensions are the supported path forward for custom checkout behaviour.

What languages are Functions written in?
Most commonly Rust, AssemblyScript, or JavaScript, compiled to WebAssembly to run efficiently within Shopify’s checkout infrastructure. The choice depends on your development team’s preference and the specific extension point.

How much does building a custom Function cost?
It varies with complexity, a single, well-defined discount Function is a relatively contained project; a suite of Functions covering discounts, shipping, and payment customisation together is a larger scope. It’s best assessed against your specific requirements rather than estimated in the abstract.

Next step

If you’re not sure whether your checkout requirements need a custom Function, a workaround, or nothing at all, that’s worth working through properly before committing development time. Book a call and we’ll help you scope it against your actual store setup.

Niraj Raut
Written by Niraj Raut SEO Manager

Niraj Raut is the SEO Manager and co-founder at Nexly. He helps Australian Shopify and Shopify Plus brands earn durable organic growth through technical SEO, search-led store architecture and content that ranks. He writes about what actually moves rankings for ecommerce.

Connect on LinkedIn
Have a Shopify project? Chat with us, takes 30 seconds.