Checkout rules reference

Updated · 6 min read · Trifid Media LLC

Khaleeji COD has six checkout rules and one rename setting. COD is hidden when any switched-on rule matches. If no rule matches, COD stays, shown with the name you set. Only Cash on Delivery is changed. Cards, Apple Pay, Tabby, Tamara and every other method are never hidden or renamed.

On the Free plan you can switch on one rule. Pro ($7.99/month) lets you use all six. All your rules run as one payment customization in your store. Shopify allows 25 active payment customizations per store, so Khaleeji COD uses one of them.

The rules at a glance

Rule, as written in the appCOD is hidden whenYou fill in
Hide COD for customers tagged cod-refusedthe customer has the tag cod-refused or cod-blockednothing
Hide COD when the cart is abovethe checkout total is above the amountan amount
Hide COD on a first order aboveit's a first order and the total is above the amountan amount
Hide COD when the cart has a product tagged no-codany product in the cart has the tag no-codnothing
Hide COD in these emirates or regionsthe shipping address is in a listed regionregion codes
Hide COD in these citiesthe shipping city is on your listcity names

How does the app know which method is COD?

It reads the names of the payment methods at checkout. A method counts as COD when its name contains "Cash on Delivery", "Cash-on-Delivery", "Pay on Delivery", «الدفع عند الاستلام», «الدفع عند التسليم» or «الدفع نقدا عند الاستلام», or when the whole name is "COD", "(COD)" or "C.O.D". Capital letters don't matter. Shopify's built-in "Cash on Delivery (COD)" matches.

A method with any other name is left alone. If you use a custom manual method with a different name, change its name in Shopify so it includes one of the names above, or contact 9090mohammad123@gmail.com.

Customers tagged cod-refused

COD is hidden when the customer at checkout has the tag cod-refused or cod-blocked. The label in the app only names cod-refused, but both tags work. The refuser scan adds cod-refused. There's nothing to fill in. Type tags in lower case, exactly as shown.

Edge cases:

  • A guest checkout has no customer record, so the tag can't match. The rule works when Shopify knows who is checking out: a shopper logged in to their account, or a draft order assigned to a customer.
  • Remove the tag from the customer in Shopify admin and COD comes back for them at their next checkout.

More in how to block COD for specific customers with tags.

Cart above an amount

COD is hidden when the checkout total is more than your amount. Shopify describes this total as "the total amount for the customer to pay at checkout", so shipping and tax count once they're added. Type a plain number in your shop's currency. The field shows the currency code.

Edge cases:

  • Exactly the amount doesn't count. With 1500, a total of 1,500.00 keeps COD and 1,500.01 hides it.
  • Other currencies are converted. If a shopper checks out in another currency, the app converts the total to your shop's currency, using the rate Shopify gives it for that checkout, then compares.
  • An empty amount, or 0, means the rule does nothing even when it's ticked. It still counts toward the Free plan's one-rule limit.

First order above an amount

COD is hidden when two things are true together: it's a first order, and the checkout total is above your amount. A first order means a guest checkout, or a customer whose order count in Shopify is 0.

Edge cases:

  • Guests always count as first orders, even if the same person has bought before as a guest. The app only sees a shopper's order count when Shopify has identified them at checkout, for example when they're logged in.
  • Keep this amount below the cart amount. If it's equal or higher, the cart rule already hides COD for those totals.
  • "Above", currency conversion and empty amounts work as in the cart rule.

Products tagged no-cod

COD is hidden when any product in the cart has the product tag no-cod. One tagged product is enough. The tag goes on the product, so it covers all of that product's variants.

More in how to turn off COD for certain products.

Emirates or regions

COD is hidden when the shipping address is in a region on your list. Write each region as the country code, a hyphen and the region code, for example AE-AZ (Abu Dhabi) or AE-FU (Fujairah). Separate them with commas. An English comma or an Arabic comma («،») both work, and capital letters don't matter.

Edge cases:

  • The app builds the code from the country and region stored on the shipping address. Codes are confirmed to work for the UAE's seven emirates: AE-AZ, AE-AJ, AE-DU, AE-FU, AE-RK, AE-SH and AE-UQ.
  • Outside the UAE, use the city rule. Shopify's checkout doesn't ask for a region in Saudi Arabia, Qatar, Bahrain or Oman, so there's no region code to match. In Kuwait, Shopify's region codes already start with "KW-", so a code written in the format above doesn't match.
  • Write codes, not names: AE-AZ works, but "Abu Dhabi" or "AZ" on its own doesn't.

For the codes and when to use regions or cities, see how to limit COD by emirate, region or city.

Cities

COD is hidden when the shipping city matches a name on your list. Write names in English, Arabic or both, separated by commas, for example Al Ain, العين. The app compares whole names and ignores capital letters and spaces at the start or end.

Edge cases:

  • The whole name must match. "Al Ain" doesn't match "Al Ain City" or "Alain". Add every spelling you want to cover as its own entry.
  • The city is whatever is on the shipping address, so look at your recent orders to see the spellings your shoppers actually use.

Rename Cash on Delivery

With Show a clear name at checkout ticked, COD is shown with the Name for Arabic shoppers when the checkout language is Arabic, and with the Name for other shoppers in every other language. The defaults are «الدفع عند الاستلام» and "Cash on Delivery". You can edit both.

  • The rename isn't a rule. It doesn't count toward the Free plan's one-rule limit.
  • When a rule hides COD, there's nothing left to rename.
  • If you leave a name empty, shoppers in that language see the method's original name.

What happens when settings are missing or broken?

Nothing is hidden. If the saved settings are missing or can't be read, the payment step looks exactly as it would without the app. Khaleeji COD never changes anything other than COD, so it can't hide your other payment methods.

Where don't the rules run?

The rules run in Shopify's online checkout, including a checkout opened from a draft order's link. Shopify doesn't run payment customizations in the Shopify admin, in POS, when you collect payment for a draft order inside the admin, or when you edit an order. If COD shows or hides when you don't expect it, see troubleshooting.

Sources

  1. Shopify.dev: Payment customization Function API

Checked on the date above. Shopify and courier settings change, so check the source if something looks different.

Stop paying shipping twice for refused orders

Khaleeji COD is coming soon to the Shopify App Store. Email us and we'll tell you the day it's live.

Coming soon to the Shopify App Store · Email: