Quick answer
Use a Checkout UI Extension when you need to show or collect something in checkout. Use a Cart and Checkout Validation Function when you need Shopify to enforce a business rule and stop the buyer from proceeding.
That distinction matters more now because Shopify has been moving checkout blocking away from UI extensions and toward server-side validation Functions. If the rule must survive express checkout, alternate storefront paths, and customers bypassing storefront JavaScript, it belongs in a Validation Function.
On this page
The decision in plain English
A UI extension is presentation and interaction inside checkout. A Validation Function is enforcement.
| Need | Better fit |
|---|---|
| Show a message, checkbox, field, banner, or custom content | Checkout UI Extension |
| Block checkout when a rule fails | Validation Function |
| Collect an acknowledgement and also enforce a related rule | Often both |
| Prevent restricted products, quantities, addresses, or buyer states | Validation Function |
| Display context about why a rule exists | UI Extension |
What a Checkout UI Extension is good at
Checkout UI extensions let an app add UI and logic at supported checkout extension targets. They are the right tool when the buyer needs to see something, choose something, or enter information as part of checkout.
Examples include:
- A terms acknowledgement.
- A delivery instruction or custom field.
- A warranty or compliance message.
- A survey or optional choice.
- A contextual notice based on cart or customer data.
For the information, shipping, and payment steps, checkout UI extensions are a Shopify Plus feature. Always check the target and plan requirements before designing around one.
What a Validation Function is good at
Cart and Checkout Validation Functions run on Shopify’s backend and return validation errors when a purchase does not satisfy a rule. Shopify documents them for rules such as quantity limits, B2B minimums, billing-address restrictions, membership requirements, and other purchase constraints.
Because the Function is enforcing the rule server-side, it is much harder for the buyer to bypass than a warning or disabled button in storefront JavaScript.
Why I would not build new enforcement around checkout blocking in a UI extension
Older checkout UI extension patterns could intercept the buyer journey and block progress. Shopify changed that direction in 2026: blocking became opt-in for merchants, and starting with API version 2026-07 the buyer-journey intercept hook and its block_progress capability are deprecated.
Shopify’s current recommendation is to move merchant business-rule enforcement to Cart and Checkout Validation Functions. That makes the architecture cleaner: UI explains; Function enforces.
When you need both
Suppose checkout needs a required acknowledgement. The UI extension can display the checkbox and explain the requirement. If the business rule truly must prevent an invalid order, a Validation Function can enforce the condition using data that is available to the Function.
The key is not to make the UI extension the only security boundary. A buyer should not be able to evade a real rule by using another checkout path.
Examples
Terms checkbox
If the goal is simply to collect acknowledgement, use a UI extension. If completing the order without the acknowledgement is prohibited by a real business requirement, pair the interaction with enforceable backend validation where the needed state can be represented safely.
Country restriction
Use a Validation Function. Shopify explicitly supports address-based validation, including billing-address restrictions. A theme redirect or hidden checkout button is not equivalent enforcement.
Quantity limits
Use a Validation Function. The rule belongs close to the cart and checkout calculation, not in a theme script that can become stale or be skipped.
Informational warning
Use a UI extension. Do not turn every message into a blocking rule.
A practical decision rule
- Does the buyer need to see or enter something? Start with a UI extension.
- Must Shopify refuse the purchase when a condition fails? Use a Validation Function.
- Do you need both explanation and enforcement? Use both, but keep each layer responsible for its own job.
- Is the rule only cosmetic or advisory? Do not add server-side validation just because you can.
Common misunderstanding
A checkout UI extension is not automatically the right place for checkout rules. Being visible in checkout and being authoritative over whether checkout may complete are two different responsibilities.
How to test this
- Test normal checkout and accelerated checkout paths.
- Confirm the rule still works when storefront JavaScript is not involved.
- Verify the UI extension is placed on the intended checkout target.
- Test the failure state and the success state.
- Check the current API version for deprecated blocking behavior.
- If using both layers, confirm the UI message matches the Function’s actual rule.

