Shopify Hide COD by Pincode: Complete Setup Guide
Shopify shows the same payment methods to every shopper. If Cash on Delivery is enabled, every shopper sees it — including shoppers in pincodes with 60% RTO rates. Lokally lets you hide COD for specific pincodes, cities, or states while keeping it available everywhere else.
This guide covers the complete setup: identifying targets, CSV format, rule configuration, the pincode widget message, what shoppers see, and how to test.
When to Hide COD by Pincode
Hide COD by pincode when you have evidence that specific pincodes have systematically high return-to-origin rates. Signs that pincode-level COD restriction is appropriate:
- Your top 100–300 pincodes generate 50–70% of COD returns
- Specific pincode clusters (often in particular cities or districts) show 40%+ RTO
- You've already tried non-location-specific interventions (prepaid incentives sitewide) with limited effect
Hiding COD state-wide is a blunter tool. Pincode-level restriction is surgical: it affects only the pincodes that actually have the RTO problem, leaving COD available for legitimate customers in adjacent areas.
Preparing Your Pincode CSV
Your CSV must have one pincode per row, no header:
400001
400002
400003
110001
110002
If your export has a header row, remove it before uploading. Lokally accepts 6-digit Indian pincodes only.
To prepare the list:
- Export Shopify orders (Admin → Orders → Export)
- Filter for COD orders that were returned or cancelled after dispatch
- Group by
Shipping Zipcolumn - Sort by return count descending
- Take the top 100–500 rows
- Save as CSV with only the pincode column, no header
Setting Up the Rule
- Open Lokally dashboard → Payment Rules
- Click New Rule
- Select Hide as the action
- Select Cash on Delivery as the target payment method
- Under Location, select Pincode as the type
- Upload your pincode CSV
- (Optional) Under Scope, select specific collections or product price thresholds if you want to keep COD available for low-value items
- Save and activate
Configuring the Pincode Widget Message
When a shopper enters a pincode where COD is blocked, the Lokally widget displays a message before they reach the checkout page.
Set this message in Lokally → Settings → Pincode Widget → COD Unavailable Message.
Recommended message:
"Cash on Delivery is not available at your pincode. We accept UPI, debit/credit cards, and net banking."
A clear message before checkout reduces:
- Cart abandonment from shoppers confused about why COD is missing
- Support tickets asking "why is COD not available?"
What Shoppers See
Shopper in a non-blocked pincode: Normal checkout with COD as an option. No change.
Shopper in a blocked pincode who enters their pincode at the widget: Sees the custom message. If they proceed to checkout, COD does not appear in the payment methods list. All other payment methods (UPI, cards, wallets) are available.
Shopper in a blocked pincode who does NOT use the widget: Proceeds to checkout and finds COD missing there. They may be confused if no context was provided. This is why the widget message is important — it pre-explains the situation.
Targeting Options Beyond Pincode
Lokally's COD hide rule supports three location types:
- Pincode: most precise, best for surgical RTO targeting
- City: hide COD for all pincodes within a city (good for "no COD in Delhi" policies)
- State: hide COD statewide (blunter, useful if an entire state has systemic RTO issues)
You can also create multiple rules: one pincode-level rule for your highest-risk areas and one state-level rule for a state with broadly high RTO.
Testing the Rule
After saving and activating:
- Open your storefront in a private/incognito browser
- Add any product to the cart
- Enter a pincode from your blocked list in the Lokally widget
- Verify the custom message appears
- Proceed to checkout — COD should not appear
- Repeat with a non-blocked pincode — COD should appear normally
Test with at least 3 blocked pincodes and 2 non-blocked pincodes to confirm the rule is working correctly.
Summary
Hiding COD by pincode in Shopify requires Lokally because Shopify's native checkout has no location-aware payment method controls. Setup: prepare a pincode CSV from your returns data, create a Payment Rules → Hide → COD rule, configure the widget message, and test with both blocked and non-blocked pincodes. Expect 20–35% overall RTO reduction within 6 weeks.