Start a project
contact@dicecodes.com
E-commerce and payments

Razorpay Cash on Delivery on Shopify: Stopping the Upfront Payment Bug

Razorpay Cash on Delivery on Shopify: Stopping the Upfront Payment Bug

Razorpay asks Shopify customers to pay online even when they chose cash on delivery because COD is being handled by Razorpay rather than by Shopify. Shopify has its own cash on delivery method. When COD runs through the gateway instead, the gateway does what gateways do and asks for payment.

What the customer actually sees

They reach checkout, pick cash on delivery, and are sent to a Razorpay page asking for a card or UPI. Some pay, confused. Most abandon. You see the drop in your checkout numbers before anyone tells you, because nobody emails to say a checkout was strange.

Why the two systems disagree

Shopify treats cash on delivery as a manual payment method. No gateway is involved: the order is created as unpaid and you collect later. Razorpay offers its own COD handling, which exists for platforms that have no equivalent. On Shopify the two overlap, and if the gateway’s version is the one switched on, every COD order is pushed through it.

The fix

  1. In Shopify, open Settings, then Payments.
  2. Find Manual payment methods and add Cash on Delivery. Shopify has a built-in option for it.
  3. Write the terms customers should read before choosing it, including any COD fee.
  4. In your Razorpay dashboard, turn COD off so it is not offered twice.
  5. Save, then place a test order and choose cash on delivery.

The test order should complete without a payment page and arrive in Shopify as unpaid, pending. That is the correct result.

Adding a COD fee without breaking it

Many Indian stores add a small fee to discourage casual COD orders. Shopify’s manual method has no fee field, so this is done either with a shipping rate that applies only to COD, or with a checkout script on Shopify Plus. Adding it as a product in the cart works but looks clumsy on the invoice and confuses returns.

Whichever route you take, say the fee in the method description as well as showing it in the total. A fee a customer only notices at the last screen is a cancelled order.

Limiting who can use COD

Once COD is a Shopify method rather than a gateway one, you can restrict it the way you restrict anything else: by postcode through shipping zones, by order value, or by hiding it for customers you have had trouble with. Those controls do not exist when the gateway owns the method, which is a second reason to move it.

If COD returns are the real problem rather than the checkout flow, the levers are different and we covered them in cutting return to origin on a Shopify COD store.

What to check afterwards

  • A COD order arrives as unpaid, pending, not as failed
  • The fee, if you added one, appears in the order total and on the invoice
  • GST is still calculated and shown, which is easy to lose when payment methods change, see GST not showing at Shopify checkout
  • Marking an order paid on delivery updates the reports you rely on

Payment methods, COD rules and the invoice all sit together on a store, so changing one usually means checking the others. That whole job is what we do on Shopify stores, and the related trap is the extra fee Shopify charges on third-party gateways.

Will turning off COD in Razorpay stop my online payments?

No. Cards, UPI and net banking carry on through Razorpay exactly as before. Only the cash on delivery option moves back to Shopify.

Can I charge a COD fee on Shopify without an app?

Yes, through a shipping rate that only applies when COD is selected. It is the simplest route and does not need Shopify Plus.

Why do some COD orders still ask for payment after the change?

Usually a cached checkout or a second gateway still offering COD. Clear the cache, then check every payment provider listed in Settings, not just Razorpay.

Does an unpaid COD order still reduce my stock?

Yes. Shopify reserves stock when the order is created, regardless of payment status, which is why uncontrolled COD hurts inventory as well as cash.

COD behaving oddly on your store?

Tell us what the customer sees and we will tell you which setting is doing it.

Dice Codes
written by

Dice Codes

Matinderpal Singh is the founder of Dice Codes, a digital agency in Batala, Punjab. He has more than ten years of experience building WordPress sites, Shopify stores and custom web applications, and maintains the free DiceStack plugin on WordPress.org.