Payment rule recipes: COD by country, cart total, tags, B2B and more

Updated · SMART Preorder & Back in stock (E-TRADE PARTNER)

Each recipe below is one payment customization: set When this customization runs to When conditions are met, add the conditions shown, add the action, save and click Activate. Replace the example names and values with your own, and check the result in a fresh checkout.

SMART Preorder & Back in stock is a free Shopify app for pre-orders, deposits, and back-in-stock alerts.

Try it free
On this page
  1. Cash on delivery
  2. Wholesale and B2B
  3. Pre-order carts
  4. Delivery, region and language
  5. Which conditions can share a customization
  6. Frequently asked questions

New to the editor? Start with Hide payment methods. In these recipes, "COD" means your cash on delivery method; match it with whose name contains and a word from its name, such as "Cash on Delivery".

Cash on delivery

Offer COD only in the countries you deliver to

  • Condition: Country is not one of the countries where you accept COD.
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • Country is the checkout's country, then the shipping address country once the buyer enters one, so this works before an address is typed.

Hide COD above a cart total

  • Condition: Cart total amount is greater than or is 500.
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • Cart total amount is what the buyer pays at checkout; Cart subtotal amount is before taxes and cart-level discounts. Enter amounts in your store currency: other currencies are converted at Shopify's rate, so prefer greater or lower over is.

Hide COD for some products

  • Condition: Product tag is any of "no-cod", Applies to Any product in the cart.
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • Tags match whole tags, exactly as spelled in Shopify. Collection and SKU work the same way if you'd rather not tag products.

Hide COD on a first order

  • Condition: Customer order count is lower than or is 0.
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • Guests and checkouts without a customer account count as 0 orders, so they lose COD too.

Hide COD while a discount is applied

  • Condition: Applied discount is any of the discounts you pick with Select discounts (up to 10 per customization).
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • It checks the discount itself, so it works for codes and automatic discounts.

Hide COD for heavy orders, some postal codes or on weekends

  • Heavy orders: Order weight is greater than or is your limit, with its unit.
  • Postal codes: Shipping ZIP/Postal Code starts with a prefix, for example "75". Spaces and case are ignored; there are no number ranges.
  • Weekends: Day of week is any of Saturday, Sunday. Dates and days use your store's time zone.
  • Action for each: Hide specific payment method(s), whose name contains "Cash on Delivery".

Wholesale and B2B

Invoice or bank transfer only for tagged customers

  • Condition: Customer tags is not any of "wholesale".
  • Action: Hide specific payment method(s), whose name contains the name of your invoice or bank transfer method.
  • Tags only match logged-in customers. Guests have no tags, so they never see the method.

Different methods for Shopify B2B buyers

  • Condition: Customer is a business customer. Narrow it with Purchasing company or Purchasing company location if needed.
  • Action: Show only specific payment method(s) with the methods B2B buyers may use, or Hide specific payment method(s) for the ones they may not.
  • For the opposite, hide a B2B-only method from everyone else with Customer is not a business customer.
  • Buyers must be logged in to a company. The address Company field is not the same thing.

Pre-order carts

Hide methods you don't want on pre-orders, for example cash on delivery, when the cart has a SMART Preorder item. Use two groups, because pre-order lines are marked in two ways:

  • Group 1, for Standard checkout campaigns (the line carries Shopify's pre-order selling plan): Subscription product is, Applies to Any product in the cart.
  • Click Add group (OR). Group 2, for Simple checkout campaigns and B2B buyers (the line carries a hidden property): Line property / attribute, Property key "_preorder", exists.
  • Action: Hide specific payment method(s), whose name contains "Cash on Delivery".
  • Real subscription products match group 1 too. Use All products in the cart instead of Any product in the cart to target carts with only pre-orders.

Standard checkout pre-orders already can't be paid with Shop Pay, Apple Pay, Google Pay or local methods: that's a Shopify rule, see Wallet or Apple Pay missing.

Delivery, region and language

Pay in store only for local pickup

  • Condition: Delivery method type is not Local pickup.
  • Action: Hide specific payment method(s), whose name contains the name of your pay-in-store method.
  • Until the buyer picks a delivery option, the condition matches, so the method stays hidden until they choose pickup.

Hide PayPal for one US state

  • Condition: Shipping state/province code is "NY". Use Shopify's region code, not the state's name.
  • Action: Hide specific payment method(s), whose name contains "PayPal".

A different payment order per country

  • One customization per country group. Condition: Country is one of the countries.
  • Action: Move payment method to the top with the method buyers there prefer, or Reorder a specific payment method with a Position (0 is first).
  • Wallets such as Shop Pay, Apple Pay, Google Pay and PayPal can't be reordered. See Sort and rename payment methods.

A translated method name

  • One customization per language. Condition: Language is one of German.
  • Action: Rename payment method(s), whose name contains "Bank Deposit", New name "Banküberweisung".

Which conditions can share a customization

Each customization runs on one of the app's Shopify Functions, and each function reads a different set of checkout data. Add condition only offers conditions that fit with the ones you've already picked. The main combinations that don't work:

If you useYou can't add
Products or VariantsCollection, SKU, login status, order count, discounts, dates
Subscription product, Gift card, Digital product, Line property / attribute or Cart attributeLogin status, order count, ZIP, city, state code, Language
Applied discountDelivery method type or name
Date or Day of weekProduct conditions
Customer is a business customer, Purchasing companyLanguage, delivery method, Product tag, SKU

If two conditions can't share one customization, split the rule into two customizations. Remember that a method hidden by any active customization stays hidden.

Build these rules for free

Every recipe here works with SMART Preorder's payment customizations, on any Shopify plan from Basic up.

Install free on Shopify

Frequently asked questions

›Can I use Shopify Markets as a condition?

No. Use Country is one of and select every country in the market.

›Can I use customer segments?

No. Shopify doesn't give segments to payment functions. Tag those customers and use Customer tags.

›Can a rule depend on the payment method the buyer selects?

No. Shopify doesn't give the selected payment method to payment customizations, so it can't be a condition.

›Can I base a rule on the billing address?

No. Address conditions use the shipping address, and Country uses the checkout's country.

Related articles