Business rules
Block COD by pincode, cart value, product or collection — and add a handling fee.
Business rules decide when cash on delivery is offered. They are enforced at checkout by a Shopify payment customization function, so a blocked buyer never sees the COD option at all.
Rule types
| Type | Example |
|---|---|
PINCODE | Block COD for a list of high-RTO postal codes. |
CART_VALUE | Hide COD above ₹5,000. |
PRODUCT | Exclude specific product IDs. |
COLLECTION | Exclude an entire collection. |
CUSTOMER_RTO | Act on a customer's own return history. |
Each rule is either BLOCK or ALLOW, and rules are evaluated in priority order. That combination is what makes exceptions manageable: write one broad BLOCK, then a narrow ALLOW above it, rather than maintaining two parallel lists.
Shop-level settings
| Field | Default | Meaning |
|---|---|---|
codMaxCartValue | null | Hide COD above this cart value. |
codBlockedPincodes | [] | Postal codes where COD is refused. |
codBlockedProducts | [] | Product IDs excluded from COD. |
codBlockedCollections | [] | Collection IDs excluded from COD. |
codFeeRateName | "" | Name of the Shopify shipping rate used to surface a COD handling fee. |
The COD handling fee
The fee is surfaced through Shopify's Shipping & Delivery rates rather than hidden in the product price. This is deliberate and it matters for compliance as well as trust: the delivery customization function will never hide the cheapest or default option for a COD order. Buyers always keep the cheapest choice and see any COD charge as a separate, clearly labelled one.
Choosing thresholds
Find the cart-value cap in your own data. Bucket ninety days of COD orders by value and look for where the RTO rate turns upward — it is usually sharper than expected. Set the cap just below that point, and offer prepaid or a deposit above it rather than refusing the sale outright.
For pincodes, require volume before you judge. Three failures out of four orders is noise. Wait for twenty-five or more orders from a postal code before blocking it, and revisit the list quarterly as courier coverage changes.
