Razorpay COD-to-Prepaid Setup Zero-Risk Delivery
Eliminate cash handling friction and convert risky Cash-on-Delivery (COD) orders into instant prepaid UPI transactions with automated discounts via Razorpay Payment Links API.
How COD-to-Prepaid Conversion Works
When a customer cannot pay in cash or requests re-delivery, ZeroRTO incentivizes instant digital payment:
2. How to Retrieve Razorpay Key ID & Key Secret
You need your API Keys generated inside your Razorpay merchant dashboard:
1. Razorpay Key ID
Starts with rzp_live_... found under Account & Settings > API Keys.
2. Razorpay Key Secret
Your private API key secret generated alongside the Key ID to authenticate link creation requests.
- Log in to your Razorpay Dashboard.
- In the left sidebar, click Account & Settings > API Keys.
- Click Generate Key (or regenerate if you lost the secret).
- Copy both the Key ID and Key Secret.
3. Exactly Where to Paste in the ZeroRTO Plugin
Open your WordPress Admin > click ZeroRTO > open the COD to Prepaid tab:
COD to Prepaid Conversion Engine
4. Register Webhook in Razorpay Dashboard
Razorpay must notify your store immediately when a customer pays via UPI:
https://yourstore.com/wp-json/rescuedrop/v1/payment-webhook/razorpay
- In your Razorpay Dashboard, go to Account & Settings > Webhooks > Add New Webhook.
- In the Webhook URL field, paste your store's dedicated endpoint URL above.
- In the Secret field, enter your Razorpay Key Secret (or custom webhook secret).
- Under Active Events, check the box:
payment_link.paid. - Click Save Webhook.
5. Military-Grade HMAC-SHA256 Signature Verification
ZeroRTO cryptographically verifies the X-Razorpay-Signature header on every incoming webhook using timing-attack-safe hash_equals(). No bad actor can fake a payment event to mark an order as paid without real funds entering your Razorpay bank account.