Checkout-safe AOV systems for Shopify — free store audit available →
Get free audit
Guide

How to Hide or Reorder Shopify Payment Methods Based on Cart Rules

July 10, 2026

How to hide, reorder or rename Shopify payment methods based on cart total, customer, region or delivery — with a payment customization Shopify Function that applies your rules at checkout.

Hiding or reordering Shopify payment methods based on cart rules

To hide payment methods on Shopify based on the cart, you use a payment customization — a Shopify Function that Shopify runs server-side at checkout. Instead of editing theme code (which never controlled the payment step anyway), the Function reads the checkout against your cart rules and then hides, reorders or renames the available payment methods. Want cash on delivery gone above €500, your preferred card surfaced first, or a B2B-only method shown to company accounts? Those are all conditions the Function evaluates every time a shopper reaches checkout, so the rule holds consistently rather than depending on client-side JavaScript that the checkout ignores.

What you can actually do

A payment customization gives you three levers over the payment methods a shopper sees, all driven by conditions you define:

The key word is conditionally. These aren’t global on/off switches (Shopify already has settings for that). A Function lets the decision depend on the specific cart in front of the shopper.

How it works: a payment customization Function

Shopify exposes a payment_customization Function target. Your Function receives the checkout — cart lines, total, buyer identity, shipping address, and the list of available payment methods — and returns a set of operations: hide, move (reorder) or rename. It runs server-side at checkout, which is the whole point. The payment step of Shopify checkout is controlled by Shopify, not your theme, so this is the supported layer to change what appears there.

Mechanically, the Function is deployed inside a Shopify app (a custom or private app you build, or one a developer builds for you), and then activated as a payment customization in Settings → Payments. Once active, it applies to every checkout automatically — no per-order work, no snippet to maintain. If you’re new to this model, our primer on what Shopify Functions are covers the mechanics, and Shopify app vs Shopify Function explains how the Function lives inside an app.

Use cases and examples

Rule conditionExampleWhat the Function does
Cart totalOrder over €500Hide cash on delivery to cut chargeback / refusal risk on high-value orders
Region / addressShipping to a remote areaHide COD or a method unsupported in that region
Delivery choiceExpress shipping selectedHide slow offline payment methods that would delay dispatch
Preferred methodAny cartReorder so your lowest-fee card or wallet appears first
Low-margin cartCart is mostly clearance itemsRestrict an expensive payment method to protect margin
Customer / companyLogged-in B2B company accountShow net-terms / invoice-style options, hide consumer-only methods
Product typeCart contains a pre-order itemHide methods you don’t want charged before fulfilment

A few of these deserve a note. Cash on delivery above a value is the single most common request — COD carries refusal and handling cost, so many merchants cap it. Reordering to surface a preferred method is underrated: it costs nothing and steers shoppers toward your cheapest or most reliable option. B2B / company-specific options rely on buyer identity being available at checkout, which fits Shopify’s B2B model where customers belong to a company; the Function can branch on whether a company is attached.

Why a Function is the right layer

Payment methods live in Shopify’s checkout, and checkout is controlled by Shopify — not by your Liquid theme. That’s why theme edits and storefront scripts can’t reliably hide or reorder them: any DOM hack either doesn’t reach the payment step or gets wiped when Shopify re-renders checkout. A payment customization Function, by contrast, is evaluated by Shopify itself at the moment of checkout, so the rule is enforced, not decorated.

This mirrors the pattern for the delivery step. If you also need to control shipping options, the same server-side logic applies — see how to hide Shopify shipping methods, which uses the sibling delivery-customization Function. And if your rules are really about whether the cart is allowed to check out at all (minimums, combinations, restricted items), that’s a validation concern covered in Shopify minimum order and checkout validation.

Implementation notes (read these before you scope it)

Common mistakes

When to build it

Reach for a payment customization Function when a static payments setting can’t express your rule — when the right set of methods depends on the cart’s value, contents, destination, delivery choice or who the customer is. If you simply want a method off for everyone, Shopify’s native settings already do that; you don’t need code. But “COD only under €300,” “preferred wallet first,” or “net terms for company accounts only” are exactly the conditional cases Functions exist for.

Building one is a focused engineering task: a Function, deployed in an app, tested across your real cart scenarios. That’s the work our Custom Apps & Shopify Functions service does — and if you’re not sure which rules are worth enforcing, a free profit audit is a fast way to find the cost and risk leaks worth closing at checkout.

Want payment methods that follow your rules? Tell us the conditions — cart value, region, customer or margin — and we’ll build a payment customization Function that hides, reorders or renames methods at checkout. See Custom Apps & Shopify Functions or get a free profit audit.

Share:

FAQ

Can you hide a payment method on Shopify based on the cart?
Yes. A payment customization (a Shopify Function) can hide, reorder or rename payment methods at checkout based on conditions like cart total, products, customer or company, shipping address or region. It runs server-side at checkout, so the rule is applied consistently rather than relying on theme code.
Why would I hide or reorder payment methods on Shopify?
Common reasons are hiding cash on delivery above a certain order value or in certain regions, surfacing preferred methods first, restricting expensive methods for low-margin orders, or showing B2B-appropriate options to company customers. It's about steering shoppers toward the right method and reducing risk or cost.
How do I customize payment methods at Shopify checkout?
Use a payment customization Function. It evaluates the checkout against your rules and hides, reorders or renames the available payment methods accordingly. This is the supported way to conditionally control payment options, and it's typically built as part of a custom app or by a developer.

Start making more on every order

Launch a checkout-safe offer yourself, or have our team set it up and dial in your store.

Lifts average order value · No checkout edits · Works on any theme

Related reading