The Razorpay gateway appears only when your store currency is INR. It needs a RazorpayX account
(Razorpay’s payouts product), not just a standard Razorpay payment-gateway account.
How it works
- A customer saves their bank details. TeraWallet registers them with RazorpayX as a Contact and a Fund Account and remembers the IDs.
- They request a withdrawal; the wallet is debited the requested amount.
- On approval (automatic, or by you), TeraWallet creates a RazorpayX payout for
amount − feefrom your RazorpayX account. - If RazorpayX accepts the payout, the request is marked Approved straight away. A payout that can’t be funded yet is queued by RazorpayX rather than rejected.
- Webhooks report progress. A failed or reversed payout cancels the request and restores the customer’s balance.
Step 1 — Get your RazorpayX details
In the RazorpayX dashboard:- Open Developer Controls (or Settings → API Keys) and generate an API Key and Secret.
Test keys start with
rzp_test_and live keys withrzp_live_. - Open My Account & Settings and copy your RazorpayX account number. This is the virtual account payouts are paid from (not your bank account number).
- Make sure the account has funds. Payouts are drawn from this balance.
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 Razorpay:Test or live mode is decided by the API key you use. Keep the key, secret and account number all from
the same mode.
Step 3 — Register the webhook
- In RazorpayX, go to Developer Controls → Webhooks → Add New Webhook.
-
Set the Webhook URL to:
- Choose a Secret and paste the same value into Razorpay Webhook Secret in TeraWallet.
-
Subscribe to these events:
Other events are ignored.
Each request is checked against the
X-Razorpay-Signature header using your webhook secret. A missing
secret returns an error and a wrong signature is rejected, so no withdrawal changes.Step 4 — What customers need to do
Customers go to My Account → Wallet → Withdrawal → Payment Settings, choose Razorpay and enter:
Invalid details are rejected with a message. If a customer later changes their name, IFSC or account number,
the old RazorpayX records are dropped and new ones are created. Without a registered fund account, the
withdrawal form tells them to set up their details first.
Step 5 — Test
- Use test keys, tick Enable Razorpay Test Mode and set the test webhook.
- As a test customer, save bank details, add balance and submit a withdrawal.
- Approve it in wp-admin.
- The request should show Approved with a note like “RazorpayX payout queued (payout_id: …)”.
- Use the RazorpayX dashboard (or the test-mode payout actions) to move the payout to processed or failed and confirm the webhook updates the request.
Go live checklist
- RazorpayX account active and funded
- Test Mode unticked and live API key, secret and account number pasted
- A live webhook created, with the same secret saved in TeraWallet
- Transfer Mode suits your payout sizes (use RTGS for large amounts, and check RazorpayX’s limits for each mode)
- Enable logging turned off
- One small real withdrawal tested end to end
Duplicate-payment protection
Each payout is sent with a stored unique idempotency key, and the payout ID is saved on the request. A retry after a timeout is recognised by RazorpayX as the same payout and 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.