Cashfree COD-to-Prepaid Setup API v2023-08-01
Eliminate non-delivery risk by converting Cash-on-Delivery (COD) orders into instant prepaid UPI intent transactions using Cashfree PG Links API.
How Cashfree COD Conversion Operates
When a courier signals an initial failed attempt, ZeroRTO offers a digital cashback discount:
2. How to Retrieve Cashfree App ID & Secret Key
You need your API credentials from your Cashfree Merchant Dashboard:
1. Cashfree App ID
Starts with CF... found under Developers > API Keys > Payment Gateway.
2. Cashfree Secret Key
Your confidential secret key used to authenticate /pg/links API calls and verify incoming signatures.
- Log in to your Cashfree Merchant Dashboard.
- In the left sidebar, click Developers > API Keys.
- Under Payment Gateway API Keys, click Generate Key.
- Copy your App ID and Secret Key.
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 Cashfree Dashboard
Cashfree must notify your store immediately when a customer pays via UPI Intent:
https://yourstore.com/wp-json/rescuedrop/v1/payment-webhook/cashfree
- In your Cashfree Merchant Dashboard, go to Developers > Webhooks > Payment Gateway.
- Click Add Webhook.
- In the Webhook URL field, paste your copied ZeroRTO endpoint URL above.
- Select the Event:
PAYMENT_LINK_EVENT(or Payment Link Paid). - Click Save Webhook.
5. Timestamp & Header Signature Security
ZeroRTO validates the x-webhook-signature and x-webhook-timestamp headers by recalculating the HMAC-SHA256 signature using your Cashfree Secret Key. Spoofed HTTP requests are rejected instantly before modifying any order status.