COD Protection asks a buyer who chooses cash on delivery to pay a small amount online before the order is confirmed: COD charges you set, an advance on the price, or both. The courier then collects only the balance. Unpaid orders never reach your courier, so fake and impulse orders stop costing you two shipping legs.
What you need
- WordPress 6.0 or later and WooCommerce 8.0 or later
- Store currency set to Indian rupee (INR)
- A Razorpay account. If Razorpay for WooCommerce is installed, its keys are reused.
- PHP 7.4 or later with the sodium extension (standard since PHP 7.2)
- A COD Protection licence key from your eternaltech.dev account
Install in five minutes
- Download the plugin zip from My account, Licences on eternaltech.dev.
- In WordPress, go to Plugins, Add New, Upload Plugin, choose the zip and activate it.
- Go to WooCommerce, COD Protection, Licence, paste your key and press Activate.
- Open COD charges to charge extra for cash on delivery, or Advance rules to take part of the price online (see COD Charges and Setting the Advance and Rules). Then switch Protection on at the top of the screen and press Save changes.
- Add the Razorpay webhook (see Connecting Razorpay), then place a test order with cash on delivery.
What the buyer sees
- At checkout, under Cash on delivery: Pay ₹2,000 online now to confirm your order. Pay the remaining ₹23,000 in cash on delivery.
- After placing the order, a pay page with the order total, the advance and the cash amount, and a Pay ₹2,000 now button.
- Razorpay Checkout opens. Once the payment is verified, the buyer lands on the normal order received page.
What you see
- The order is a normal cash on delivery order in Processing, with a line Advance paid online of minus ₹2,000 and a total of ₹23,000.
- A COD Protection box on the order screen shows the advance, the amount to collect and the Razorpay payment id.
- Shiprocket imports the order as cash on delivery for ₹23,000.
Until the licence is active and the plugin is turned on, checkout stays exactly as it was. Nothing changes for buyers while you set up.