How to hide Cash on Delivery for international Shopify orders
Short answer: Hide Cash on Delivery when the shipping country is outside India, while leaving prepaid methods available. Replace IN with your supported country. In Checkpost, choose “Cash on delivery in domestic country only” from Templates, adjust the values, test it, then save and enable the rule.
The problem
A merchant may accept cash on delivery only in the country served by their COD carrier. Blocking international checkout would lose prepaid sales. Hiding only COD keeps the other payment methods available.
Related merchant discussion on Shopify Community
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Cash on delivery in domestic country only.
- Set the allowed shipping countries and match your exact COD method name.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Hide payment methods containing "Cash on Delivery" when all of these conditions is true:
- Country is none of IN
Shoppers see no message: the methods are changed before checkout shows them.
Rule definition (JSON)
{
"name": "Domestic COD only",
"action": {
"kind": "hide_payment",
"methods": [
"Cash on Delivery"
],
"match": "contains"
},
"match": "all",
"conditions": [
{
"kind": "text",
"field": "ship_country",
"op": "not_equals_any",
"values": [
"IN"
]
}
]
}Examples with the default settings
These outcomes apply to this rule alone. Other enabled rules may also affect checkout.
| Test cart | Expected outcome |
|---|---|
| Shipping to India (IN) | Methods unchanged by this rule |
| Shipping to the US | Hide payment methods containing "Cash on Delivery" |
Where this rule works
This changes matching payment methods that Shopify exposes to the customization. Payment rules do not have the same express-checkout coverage as cart validation. Shopify limits wallet customization and credit-card customization on non-Plus US/Canada stores. See Shopify's payment compatibility and verify your COD/manual method in a development store. Geographic payment rules currently use the first delivery group's address.
Tips
- Replace IN with your supported country codes; this checks the shipping address rather than market or IP location.
- Match the COD name shown by your actual manual payment method.
- The payment Function currently reads country and province, not postcode. A postal-code COD area needs additional input support; this preset must not be advertised as a postcode filter.
Can you do this without an app?
Review Shopify's manual payment configuration first. This preset adds conditional visibility to an existing COD method; it does not activate COD or arrange collections.
FAQ
Will international customers still be able to pay by card?
The preset hides only methods whose names contain Cash on Delivery. Other available payment methods are unchanged.
Can this be limited to one state instead?
Yes. Replace or combine the country condition with Shipping state/province is none of your supported state codes; keep a country condition to disambiguate codes.
Related rules
Hide cash on delivery over $500
Hide the Cash on Delivery payment method when the cart subtotal is over 500, so big orders are paid upfront.
Hide cash on delivery for first orders
Only returning customers can pay cash on delivery: hide it for guests and customers without a previous order.
Hide pay-later methods for pre-orders
Hide buy-now-pay-later and cash on delivery when the cart contains pre-order products.
Show bank transfer first for wholesale
Move the bank transfer payment method to the top of the list for customers tagged wholesale.