Abstract geometric cubes representing modular Shopify checkout components that combine UI extensions and Functions

When to Use Checkout UI Extensions vs Shopify Functions

When to Use Checkout UI Extensions vs Shopify Functions

Sep 11, 2026

Octavian Contis 10 minutes

Share

A merchant on Shopify Plus asks for gift-wrap at checkout. The requirement sounds simple: let the buyer add a £5 gift-wrap option and include a message for the recipient.

The build requires two components: a UI Extension that renders the gift-wrap checkbox and message field, and a Function that adds the £5 line item when the buyer selects the option. Miss either piece and the checkout either cannot collect the input or cannot apply the charge.

Shopify Plus checkout extensibility splits work into display (UI Extensions) and logic (Functions). Knowing where each lives before scoping prevents spec drift, duplicate effort, and "we thought the other part was included" conversations mid-project.

Introduction

This article teaches you when a Shopify Plus checkout project needs a UI Extension, a Function, or both working together. If your question is whether Plus is the right plan at all, see Choosing the Right Shopify Plan. If checkout abandonment is the immediate pain, start with How to Fix Shopify Checkout Abandonment before adding custom extensions.

The decision merchants face

Shopify Plus unlocks two distinct extension surfaces at checkout:

  1. Checkout UI Extensions render visual elements at defined insertion points: banners, custom fields, product recommendations, trust badges, consent checkboxes, and promotional blocks.

  2. Shopify Functions run backend logic that modifies checkout behaviour: discount calculations, cart line transformations, validation rules, delivery option filtering, and payment method customisation.

The confusion happens because both are "checkout extensions" and both ship via the same app deployment. Merchants often brief a requirement as one thing when the build is two, or scope a Function when the job is purely display.

Checkout extensibility split

YesNoYesNoYesNoCheckout requirementDoes the job changehow checkout works?Shopify FunctionBackend logicDoes the job showsomething to the buyer?UI ExtensionDisplay layerMay not need custombuildDoes the buyerneed to see the result?Function + Extensionpaired buildFunction onlyCheckout extensibility split
Checkout extensibility split

Checkout UI Extensions: what they do

UI Extensions are Preact or vanilla JS components that render inside Shopify's hosted checkout. They cannot access the network freely, cannot run arbitrary DOM manipulation, and are sandboxed for security. What they can do:

  • Render components at defined targets: after contact fields, around shipping options, in the order summary, in the header or footer, and as merchant-positionable blocks.
  • Read checkout state: cart lines, buyer identity, delivery address, selected shipping method, applied discounts.
  • Write to checkout state via approved APIs: attributes, metafields, selected options.
  • Present inputs: text fields, checkboxes, selects, consent collection.

Common UI Extension jobs

JobExtension targetWhat the Extension does
Gift message fieldpurchase.checkout.block.renderRenders a text area; writes to cart attributes
Trust badgespurchase.checkout.cart-line-list.render-afterDisplays payment icons and guarantee copy
Age verificationpurchase.checkout.contact.render-afterPresents a checkbox; blocks proceed until checked
Delivery instructionspurchase.checkout.delivery-address.render-afterRenders a field for driver notes
Upsell bannerpurchase.checkout.reductions.render-beforeShows a product recommendation with add button
Shipping option explainerpurchase.checkout.shipping-option-item.details.renderAdds detail text under each shipping method

UI Extensions handle display work: they show information, collect input, and present options. Discount calculations, payment filtering, and cart validation belong in Functions because those jobs change checkout rules rather than render content.

Shopify Functions: what they do

Functions are Rust or JavaScript modules that run on Shopify's backend. They are pure: no network access, no file system, no current time. All data comes via a GraphQL input query; all output is a structured JSON result.

Functions modify checkout behaviour:

  • Discount Functions compute product, order, or shipping discounts and return the discount operations to apply.
  • Cart Transform Functions expand or modify cart lines: bundle expansion, gift-with-purchase, subscription upgrades.
  • Validation Functions accept or reject the cart at checkout, with an error message if rejected.
  • Delivery Customisation Functions sort, rename, or hide shipping options based on cart contents or buyer location.
  • Payment Customisation Functions sort, rename, or hide payment methods.
  • Fulfillment Constraints Functions control how orders route to fulfillment locations.

Common Function jobs

JobFunction APIWhat the Function does
Tiered volume discountDiscountReturns discount operations when cart total exceeds thresholds
Hide COD for high-value ordersPayment CustomisationRemoves cash-on-delivery when cart exceeds £500
Block checkout for restricted productsValidationRejects cart with an error if product requires age verification
Auto-add free giftCart TransformAdds a gift line when cart qualifies
Sort shipping by delivery speedDelivery CustomisationReorders shipping options fastest-first
Regional payment filteringPayment CustomisationHides Klarna for buyers outside supported countries

Functions handle backend logic exclusively, with no rendering capability. When the buyer needs to see why a payment method is hidden or how close they are to a discount threshold, a paired UI Extension handles that display layer.

Criteria that actually matter

Before scoping, answer these questions:

1. Does the job change checkout rules?

If yes, the job needs a Function. Discounts, validation, cart modification, delivery filtering, and payment filtering all live in Functions.

2. Does the job display something to the buyer?

If yes, the job needs a UI Extension. Banners, fields, badges, consent checkboxes, and promotional messages are Extension work.

3. Does the buyer need to see the result of a rule change?

If a Function does something invisible (hide a payment method, auto-apply a discount), and the buyer should understand why, a paired Extension explains it. The Function does the logic; the Extension shows the logic.

4. Does an app already solve this?

Many common jobs (upsells, trust badges, tiered discounts) have App Store solutions that package Extensions and Functions already. Check before building custom. If an app fits, it is faster and cheaper. Custom development is for business-specific logic that apps cannot configure.

Requirement typeUI ExtensionFunctionBoth
Collect gift message
Add gift-wrap fee
Collect gift message and add fee
Show trust badges
Tiered discount based on cart total
Tiered discount with progress bar
Block checkout for age-restricted items
Age verification with checkbox
Hide payment method for certain products
Explain why payment method is hidden
Delivery date selector
Filter delivery options by postcode

Framework for scoping checkout projects

Use this sequence when a merchant briefs a checkout requirement:

  1. Name the job in buyer terms. What does the buyer do or see differently at checkout?

  2. Split display from logic. If the answer has "show" or "collect", that is Extension work. If the answer has "calculate", "filter", "add", "block", or "sort", that is Function work.

  3. Check whether display depends on logic. If the Extension needs to show the outcome of a rule (discount amount, validation status), the build is paired.

  4. Search the App Store. If an app handles the job, quote the app first. Custom build if the app cannot configure the business-specific requirement.

  5. Map to extension points. For UI work, identify the render target. For Function work, identify the API (Discount, Validation, Cart Transform, etc.).

  6. Scope the data contract. If paired, define how the Extension reads the Function output. Usually via cart attributes, metafields, or checkout state that the Function populates.

Recommendation by scenario

Scenario A: Display only

The job is to show something at checkout without changing checkout behaviour. Examples: trust badges, delivery estimates, brand messaging, field to collect a note.

Build: UI Extension only. Pick the render target closest to where the buyer needs the information. Store collected input in cart attributes or metafields.

Scenario B: Logic only

The job is to change checkout behaviour invisibly. Examples: auto-apply a discount, hide a payment method, block checkout for out-of-stock bundles.

Build: Function only. Define the input query, implement the logic in Rust or JS, return the structured output. No display component.

Scenario C: Logic with display

The job is to change checkout behaviour and communicate the change to the buyer. Examples: tiered discount with progress bar, age verification with checkbox, hidden payment method with explanation.

Build: Function and UI Extension as a paired build. The Function handles logic; the Extension reads checkout state (including Function output where visible) and renders the display. Define the data contract between the two.

Scenario D: App handles it

The job is common enough that an App Store app packages the Extension, Function, or both. Examples: standard upsell modules, Klaviyo checkout fields, ReCharge subscription upgrades.

Build: Configure the app. Reserve custom development for requirements the app cannot meet. Apps are faster to deploy and maintained by the vendor.

Technical constraints worth knowing

Before promising a checkout build, verify:

  • Plus is active. Checkout UI Extensions and checkout-specific Functions require Shopify Plus. Standard plans do not have checkout extensibility.
  • Target availability. Not all render targets are available on all checkout surfaces. Shop Pay and Thank You pages have different target lists than the main checkout flow.
  • Function purity. Functions cannot call external APIs at runtime. All data must come via the input query. If the logic depends on external state (inventory in an ERP, loyalty points in a CRM), that data must sync to Shopify metafields before checkout.
  • Component limits. UI Extensions use Shopify's Polaris component library. Custom HTML or third-party JS libraries are not supported. If the design requires unsupported UI, the spec needs adjustment.
  • Deployment coupling. Extensions and Functions deploy together as part of a Shopify app. Versioning, testing, and rollback affect both. Plan for coordinated releases if the build is paired.

For a breakdown of how these constraints fit into broader stack architecture, see The Anatomy of a High-Performance Shopify Theme. If the project involves migrating checkout customisations from another platform, migration blueprints cover data and logic porting: Magento to Shopify, WooCommerce to Shopify.

When to get help

Checkout extensibility is mature, but the build surface is not trivial. Consider specialist help when:

  • The requirement spans multiple Function APIs and multiple Extension targets.
  • The logic depends on external data that needs a sync pipeline before checkout.
  • The existing theme or app stack has legacy checkout scripts that need migration.
  • The build is paired and the data contract between Function and Extension is unclear.

A structured stack review identifies which checkout jobs are standard, which need custom build, and which need architectural prep before extensibility work starts. See Shopify UI Extensions and Functions services for how we scope these projects, or book a stack assessment to map your checkout roadmap.

Conclusion

Shopify Plus checkout extensibility spans two surfaces: UI Extensions for display and Functions for logic. Most checkout requirements touch one or the other; many touch both.

Before scoping, split the job: what changes checkout rules, and what shows information to the buyer? Match each part to the right extension point. Check the App Store before building custom. If the build is paired, define the data contract between Function and Extension early.

The right split prevents spec drift, keeps builds maintainable, and ensures the buyer sees a coherent checkout experience without invisible logic doing one thing and visible UI doing another.

Frequently Asked Questions

Checkout UI Extensions render visual elements at defined points in the checkout flow: banners, custom fields, trust badges, and promotional blocks that control what buyers see. Shopify Functions run backend logic that changes how checkout works: discount calculations, payment method filtering, delivery option sorting, and cart validation. Extensions handle the display layer while Functions handle the rules layer, and most checkout projects need both working together.

Yes. Checkout UI Extensions require Shopify Plus. Standard Shopify plans offer branding controls (logo, colours, fonts) but not programmatic extensibility. If a checkout requirement cannot be met with branding settings or a Shopify app, the build requires Plus for checkout extensibility.

No. Functions are pure backend logic with no rendering capability. A Function can compute a discount or reject a cart, but it cannot display a banner explaining why. To show the result of a Function to the buyer, you need a paired UI Extension that reads the Function output or checkout state and renders the message.

Use both when the checkout job has a logic layer and a display layer. A tiered discount Function calculates the saving; a UI Extension shows the buyer how close they are to the next tier. A validation Function rejects alcohol purchases without ID confirmation; a UI Extension presents the age-check checkbox. The Function does the work; the Extension shows the work.

Shopify Functions support several checkout extension points: Discount (product, order, shipping), Cart Transform (bundle expansion, gift-with-purchase), Cart and Checkout Validation (blocking invalid carts), Delivery Customisation (sorting and renaming shipping options), Payment Customisation (hiding or reordering payment methods), and Fulfillment Constraints (controlling order routing). Each API has an input schema and an expected output shape.

Checkout UI Extensions have defined targets: after contact fields, before or after shipping options, around payment method lists, in the order summary, in the header and footer, and as block placements that merchants can position in the checkout editor. Each target determines which components and APIs the extension can access. Choose the target closest to where the buyer needs the information.

Some Shopify apps package pre-built UI Extensions or Functions for common jobs like upsells, trust badges, or tiered discounts. Check the App Store before scoping custom work. If an app fits, it is usually faster and cheaper than building from scratch. Custom development is justified when the requirement has business-specific logic an off-the-shelf app cannot configure.

Related Articles