Lokally is launching on the Shopify App Store soon.

COD & RTO

Shopify Hide COD by Pincode: Complete Setup Guide

How to hide Cash on Delivery for specific pincodes on Shopify using Lokally - covering the pincode list, the payment rule, the storefront message, what shoppers see, and how to test.

By the Lokally team5 min read
  • hide COD
  • shopify
  • pincode
  • payment methods
  • RTO

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 where most COD orders come back. Lokally lets you hide COD for specific pincodes (or whole cities and states, using pincode ranges and wildcards) while keeping it available everywhere else.

This guide covers the complete setup: identifying targets, creating the region, the payment rule, telling shoppers before checkout, 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 consistently high return-to-origin rates. Signs that pincode-level COD restriction is appropriate:

  • A relatively small set of pincodes generates a large share of your COD returns
  • Specific pincode clusters (often in particular cities or districts) show much higher RTO than the rest
  • 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 targeted: it affects only the pincodes that actually have the RTO problem, leaving COD available for customers in adjacent areas.

Preparing Your Pincode List

To prepare the list:

  1. Export Shopify orders (Admin → Orders → Export)
  2. Filter for COD orders that were returned or cancelled after dispatch
  3. Group by Shipping Zip column
  4. Sort by return count descending
  5. Take the top 100–500 rows
  6. Copy the pincode column

Creating the Region

  1. Open Lokally → Regions and add a region, for example No COD
  2. Paste your pincodes, one per line or comma-separated:
400001
400002
400003
110001
110002

You can also use ranges (400001-400099) and wildcards (40*) to cover a whole area.

Setting Up the Rule

  1. Open Lokally → Payment rules
  2. Click Reload payment methods to find the methods used in your recent orders, or add Cash on Delivery by name exactly as it appears at checkout
  3. On Cash on Delivery, click Add Rule
  4. Choose the No COD region and Always hide
  5. (Optional) In the Cash on delivery limit card, hide COD above an order value, for all regions or per region
  6. Save

Telling Shoppers Before Checkout

Payment rules apply at checkout, based on the delivery address. To explain it earlier, add a Lokally announcement bar block in your theme editor, then in Lokally → Storefront content set its text for the No COD region.

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 with a delivery address outside the region: Normal checkout with COD as an option. No change.

Shopper who enters a pincode in the region on your storefront: Sees the region's announcement bar message. At checkout, COD does not appear for a delivery address in the region. All other payment methods (UPI, cards, wallets) are available.

Shopper who doesn't enter a pincode on your storefront: Finds COD missing at checkout once their delivery address is in the region. They may be confused if no context was provided, which is why the storefront message helps.

Targeting Options Beyond Pincode

Regions are built from pincodes, so the same rule can be as narrow or as wide as you need:

  • Individual pincodes: most precise, best for targeted RTO restriction
  • Ranges: for example 110001-110099 for part of a city
  • Wildcards: for example 11* for all of Delhi, or a state's prefixes to cover the whole state

You can also create several regions: one for your highest-risk pincodes and another for a state with broadly high RTO, each with its own rule.

Testing the Rule

After saving:

  1. Open your storefront in a private/incognito browser
  2. Enter a pincode from the region in the Lokally popup or widget, and check the announcement bar message
  3. Add any product to the cart and go to checkout
  4. Enter a delivery address with a pincode from the region - COD should not appear
  5. Change the delivery address to a pincode outside the region - COD should appear normally

Test with at least 3 pincodes inside the region and 2 outside it to confirm the rule is working correctly.

Summary

Hiding COD by pincode in Shopify needs an app, because Shopify's own checkout settings can't turn payment methods on or off by pincode. With Lokally: build a region from your returns data, add a Payment rule that hides COD there, explain it with a regional announcement bar, and test with pincodes inside and outside the region. Then track your RTO for that region over the following weeks.

Ready to try Lokally?

7-day free trial at launch. Billed through Shopify, cancel anytime.