ZeroRTO Docs v1.0.0
Main Website Pricing Plans Merchant Portal
India Payments • Dynamic UPI Intent

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.

Cashfree PG Dynamic Links Engine

Instant UPI Intent, Google Pay, PhonePe, Paytm, QR & Cards

HMAC SHA-256 PAYMENT_LINK_EVENT

How Cashfree COD Conversion Operates

When a courier signals an initial failed attempt, ZeroRTO offers a digital cashback discount:

1. Delivery Unsuccessful Customer requested time
2. Cashfree Link Generated Automated discount subtracted
3. Immediate Prepaid Sync Order converted with zero cash risk

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.

  1. Log in to your Cashfree Merchant Dashboard.
  2. In the left sidebar, click Developers > API Keys.
  3. Under Payment Gateway API Keys, click Generate Key.
  4. 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:

WordPress Admin > ZeroRTO > COD to Prepaid Tab
Step 1: Enable Toggle
COD to Prepaid Conversion Engine
Step 2: Set Discount Value
50
Step 3: Select Cashfree
Cashfree Payments (Selected) Active Gateway
Step 4: Paste App ID
CFxxxxxxxxxxxxxxxx
Step 5: Paste Secret Key
••••••••••••••••
Step 6: Copy Webhook URL
Dedicated Cashfree Webhook Endpoint

Register this endpoint in Cashfree Dashboard > Developers > Webhooks:

https://yourstore.com/wp-json/rescuedrop/v1/payment-webhook/cashfree

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
  1. In your Cashfree Merchant Dashboard, go to Developers > Webhooks > Payment Gateway.
  2. Click Add Webhook.
  3. In the Webhook URL field, paste your copied ZeroRTO endpoint URL above.
  4. Select the Event: PAYMENT_LINK_EVENT (or Payment Link Paid).
  5. Click Save Webhook.

5. Timestamp & Header Signature Security

Cryptographic Fraud Prevention

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.