The Cashfree gateway appears only when your store currency is INR. It needs a Cashfree Payouts
account, which is separate from a Cashfree payment-gateway account.
How it works
- A customer saves their bank details. TeraWallet registers them with Cashfree as a beneficiary
(ID
ww_user_<user id>). - They request a withdrawal; the wallet is debited the requested amount.
- On approval (automatic, or by you), TeraWallet creates a Cashfree transfer (bank transfer, INR) for
amount − fee. - If Cashfree accepts the transfer (status
SUCCESS,RECEIVED,PENDINGorAPPROVAL_PENDING), the request is marked Approved straight away. - Webhooks report the final result. A failed, rejected or reversed transfer cancels the request and restores the customer’s balance.
Step 1 — Get your Cashfree credentials
In the Cashfree Payouts dashboard:- Open Developers → API Keys (the Payouts section) and generate a Client ID and Client Secret. Sandbox and production have separate credentials.
- If Cashfree asks you to whitelist IP addresses for API access, add your server’s outgoing IP.
- Make sure the Payouts balance is funded. Transfers are drawn from it.
Menu names in the Cashfree dashboard change from time to time. If you can’t find an item, search the
dashboard for “API keys” or “webhooks” or check Cashfree’s Payouts documentation.
Step 2 — Configure TeraWallet
Go to TeraWallet → Settings → Withdrawal. Turn on Enable Withdrawal, choose the Approval Mode (use Manual while testing) and turn on Enable logging during setup. Then, under Cashfree:Step 3 — Register the webhook
- In the Cashfree Payouts dashboard, open the Webhooks settings.
-
Set the webhook URL to:
-
Enable the transfer events below, and save.
x-webhook-signature, with x-webhook-timestamp) using your Client Secret. Requests with a missing
or wrong signature are rejected.
Step 4 — What customers need to do
Customers go to My Account → Wallet → Withdrawal → Payment Settings, choose Cashfree and enter:
Invalid values are rejected with a message. On success the customer sees “Cashfree beneficiary
registered.” Without a registered beneficiary, the withdrawal form tells them to register their bank
account first.
Step 5 — Test in sandbox
- Tick Enable Cashfree sandbox and use sandbox credentials.
- As a test customer, save bank details, add balance and submit a withdrawal.
- Approve it in wp-admin (or use Automatic mode).
- The request should show Approved with a note like “Cashfree transfer ww_cf_123 queued (status: …)”.
- Confirm the webhook updates the request when Cashfree reports the final status.
Go live checklist
- Payouts account activated and funded for production
- Server IP whitelisted, if Cashfree requires it
- Sandbox unticked and production Client ID and Secret pasted
- Production webhook URL saved in Cashfree
- Enable logging turned off
- One small real withdrawal tested end to end
Duplicate-payment protection
Each transfer has a fixed ID (ww_cf_<withdrawal id>) that is also sent as an idempotency key. TeraWallet also
saves it on the request and skips creating another transfer if one exists. Re-approving can’t pay twice.
Troubleshooting
Enable Enable logging and open the request to see its log. Failure reasons are also saved as notes.
See Pro Hooks & REST API for the full reference.