Skip to main content
Back to Articles

Shopify Checkout Extensibility: Building Custom B2B Routing Logic

By Wilson TechnologyPublished
ShopifyB2BEcommerceArchitectureIntegration

For years, enterprise brands running wholesale and retail operations on Shopify relied on a brittle, inherently risky file: checkout.liquid. It was the wild west of customization, where developers wrote raw code to inject specialized rules, resulting in flexible but extremely fragile payment and shipping workflows. It was also increasingly incompatible with modern payment features like Shop Pay and Apple Pay.

To resolve these bottlenecks, the platform introduced Shopify checkout extensibility. This new paradigm entirely replaces checkout.liquid with a modern, secure, and upgrade-safe model built around Checkout UI Extensions and Shopify Functions. For B2B e-commerce businesses requiring complex workflows like custom net terms, specialized shipping routing, and wholesale-specific payment gateways, migrating to this new framework isn’t just an update—it’s a necessary architectural shift, especially for merchants already scaling B2B checkout on Shopify Plus past Draft Order API limits.

In this article, we'll explore how developing custom apps for this ecosystem allows you to build robust, scalable custom checkout logic that injects specialized B2B shipping and payment rules directly into the Shopify checkout flow.

The Problem with Legacy B2B Logic

Before diving into the solution, it’s important to understand the business problem. In a traditional B2B setup, rules are heavily customized. A wholesale buyer might have negotiated Net 30 terms, require specialized freight shipping instead of standard parcel carriers, and demand specific taxation rules.

In the legacy checkout.liquid era, implementing these rules meant intercepting the checkout flow with heavy, custom scripts. This approach had severe drawbacks:

  1. Maintenance Nightmares: Every Shopify update carried the risk of breaking custom checkout code, leading to unpredictable downtime.
  2. Performance Degradation: Heavy scripts slowed down the checkout experience, directly impacting conversion rates.
  3. Security Vulnerabilities: Direct access to the checkout DOM opened up potential security risks.
  4. Incompatibility: Custom code often clashed with accelerated checkout methods (Shop Pay, Google Pay).

The business impact of these technical flaws was profound. A broken checkout in a B2B context doesn't just mean a lost $50 sale; it means a disrupted wholesale order worth thousands, strained relationships with key distributors, and manual intervention from customer service teams to process orders offline.

The Wilson Tech Approach

The classic tech fix for B2B checkout complexities often involved duct-taping third-party apps together or relying on highly customized, unscalable middleware to intercept orders post-checkout. These integrations often introduce new risks. For instance, Celigo's pre-built integration apps tend to fail during peak season, downtime is expensive, and the platform itself has strict licensing-tier limitations, while forcing high-volume syndication through restrictive channels can expose Shopify's API limitations, disrupting order fulfillment if the integration poorly shares the same API credentials. Furthermore, pushing this complexity into backend systems can mean that NetSuite's complex interfaces cause training bottlenecks for your team. This approach treats the symptom (a rigid checkout) rather than the disease (a fundamentally misaligned operational workflow)

At Wilson Technology, we solve the business problem first, then build the tech around it. We recognize that checkout isn't just a technical transaction; it's the culmination of your entire B2B sales operation.

Instead of deploying risky "rip and replace" system overhauls or standard "band-aid" technical solutions, we advocate for the Strangler Fig Pattern to incrementally decouple business processes from legacy middleware with zero downtime. We take a holistic lifecycle approach to reduce costs and improve performance. This is systems integration work at its core: we analyze how your wholesale terms are structured in your ERP, how shipping logistics are handled by your 3PL, and how finance manages invoices. By fully mapping this process, we can leverage Shopify Checkout Extensibility natively.

We build lightweight, highly performant Shopify Functions that cleanly translate your business rules directly into the checkout experience. This eliminates the need for fragile workarounds, significantly reduces maintenance costs, and ensures that your checkout remains blazingly fast and compatible with future Shopify updates.

Enter Shopify Checkout Extensibility

Checkout Extensibility provides a structured, secure way to customize the checkout experience. It relies on two primary mechanisms:

  • Checkout UI Extensions: Allow developers to inject custom UI elements (like banners, fields, or specific messaging) into defined zones within the checkout flow.
  • Shopify Functions: The core engine for custom B2B routing. Functions allow developers to write custom backend logic (using WebAssembly) that executes directly on Shopify's infrastructure, overriding default behavior for discounts, shipping, and payment methods.

Building custom checkout logic with Shopify Functions: Shopify Functions are the key to implementing complex B2B logic without compromising performance or security. Here is how they address the most common B2B routing scenarios:

Custom Shipping Logic

B2B orders often involve bulk shipments that require freight routing rather than standard FedEx or UPS. Using the Delivery Customization API (a subset of Shopify Functions), you can write logic to dynamically hide, rename, or reorder shipping methods based on the customer's B2B company profile or the contents of their cart.

For example, if a customer is tagged as a "Wholesale Tier A" buyer and their cart exceeds 500 lbs, the Function can automatically hide standard shipping options and present only LTL (Less Than Truckload) freight options.

Payment Method Customization

Wholesale buyers typically do not pay with standard credit cards at checkout. They rely on Purchase Orders (POs) or Net Payment Terms. The Payment Customization API allows developers to dictate which payment methods are available.

If a buyer logs in with a verified B2B account, a custom Function can hide the credit card gateway and present a custom "Net 30 / Invoice" payment method. Conversely, if a standard retail customer is checking out, the Net terms option remains hidden.

Implementing the Solution: A Phased Transition

Transitioning to Checkout Extensibility requires a thoughtful strategy, especially for enterprise brands migrating off checkout.liquid before the August deadline.

  1. Audit Existing Logic: We begin by thoroughly auditing your current checkout.liquid file and any existing checkout scripts. We document every custom rule, discount, and routing logic currently in place.
  2. Map to Functions and UI Extensions: We determine how each legacy rule translates to the new Extensibility model. Complex logic moves to Shopify Functions, while visual modifications move to UI Extensions.
  3. Development and Testing: We build the necessary custom apps, following the same CI/CD pipeline discipline we use for every custom Shopify app. Crucially, Checkout Extensibility allows for testing in a development environment without disrupting the live checkout, ensuring a smooth transition.
  4. Deployment and Monitoring: Once validated, the new custom apps are deployed, and the legacy checkout.liquid dependencies are sunset.

What Checkout Extensibility Means for Your B2B Migration

Shopify Checkout Extensibility is a massive step forward for B2B e-commerce on the platform. By moving away from fragile front-end scripts and embracing robust, server-side Shopify Functions, enterprise brands can build highly customized, secure, and blazing-fast checkout experiences.

Transitioning to a modern B2B checkout natively supports your business logic while reducing operational friction.

Ready to move your B2B checkout logic off checkout.liquid?

If your wholesale net terms, freight routing, or payment rules still live in fragile checkout.liquid scripts, the migration to Shopify Functions is no longer optional — it's a chance to rebuild that logic properly.

Ready to build custom B2B routing logic into your Shopify checkout? Contact WTECH to schedule a technical discovery session.

Frequently Asked Questions

What replaces checkout.liquid for B2B customizations?

Shopify replaced checkout.liquid with Checkout Extensibility, utilizing secure Checkout UI Extensions and server-side Shopify Functions.

Can I hide specific payment methods for B2B buyers?

Yes, you can use the Payment Customization API within Shopify Functions to hide or show specific payment methods like Net Terms.

How does Checkout Extensibility handle freight shipping?

The Delivery Customization API dynamically sorts, renames, or hides shipping options based on cart weight or B2B customer profiles.

Are Shopify Functions fast enough for checkout?

Yes, Shopify Functions execute custom logic natively on Shopify's backend infrastructure using WebAssembly, ensuring near-instant performance.