If you sell hosting to Indian customers, Razorpay is non-negotiable. Cards alone won't cut it — UPI, NetBanking, and wallets together are how Indians actually pay online. Stripe India exists but has friction; Razorpay is the local-friendly choice for WHMCS.
This is the setup that works for hosting brands targeting India.
Why Razorpay specifically for India
- UPI — the dominant Indian payment method. Free for low transaction values. Razorpay supports it natively.
- NetBanking — Indian customers without cards pay this way.
- Wallets — Paytm, PhonePe, etc.
- Cards (Indian + International) — yes.
- Settlements in INR to your Indian bank account.
- Compliant with RBI rules for recurring payments (eMandate / e-NACH).
Step 1 — Set up the Razorpay account
- Sign up at razorpay.com. You need a registered Indian business (Sole Proprietorship is fine; you'll need GST registration for >₹20L/year).
- KYC: PAN, GST, business address, bank account.
- Activation typically takes 2-3 business days.
- Once activated, you get test mode + live mode.
Step 2 — Get API credentials
Razorpay Dashboard → Settings → API Keys → Generate Test Key (for development) and Live Key (for production).
You get:
- Key ID — looks like
rzp_test_XXXXXXXXorrzp_live_XXXXXXXX. - Key Secret — keep this server-side only.
Step 3 — Install the WHMCS Razorpay module
Razorpay provides an official WHMCS module. Download from their GitHub or their docs page. Upload to /modules/gateways/.
If using a third-party module instead, vet it carefully — payment gateway modules touch sensitive data.
Activate: WHMCS Admin → Setup → Payments → Payment Gateways → Razorpay → Activate.
Step 4 — Configure the module
- Display Name: "Pay with Razorpay (Cards, UPI, NetBanking)".
- Key ID: your live key ID.
- Key Secret: your live key secret.
- Webhook Secret: set in step 5.
- Convert To For Processing: INR. WHMCS converts the invoice amount to INR for processing.
- Subscriptions: enable if you need recurring billing.
Step 5 — Set up the webhook
Critical for refunds and disputes syncing back to WHMCS.
- Razorpay Dashboard → Settings → Webhooks → Add New Webhook.
- URL:
https://yourwhmcs.com/modules/gateways/callback/razorpay.php. - Events:
payment.authorized,payment.captured,payment.failed,refund.created,refund.processed,subscription.charged,subscription.cancelled. - Set a webhook secret (Razorpay generates one).
- Paste the secret into WHMCS Razorpay module config.
Step 6 — Test the integration
Use Razorpay test keys and their test card numbers:
- Test card:
4111 1111 1111 1111(any future expiry, any CVV). - Test UPI ID:
success@razorpayfor success;failure@razorpayfor failure. - Test NetBanking: pick any bank; pop-up shows success/failure buttons.
Run the full cycle:
- Place test order in WHMCS.
- Pay via card / UPI / NetBanking.
- WHMCS marks invoice paid.
- Refund from Razorpay dashboard → invoice marks refunded.
- Test recurring renewal if applicable.
Recurring billing — the Indian rules
RBI's 2021 rules mean stored cards can't be auto-charged without explicit customer consent. Razorpay handles this via eMandate / e-NACH — the customer authorizes once via a digital mandate; future charges work.
For hosting renewals:
- First order: customer pays normally via Razorpay.
- If recurring enabled: Razorpay creates a Subscription object linked to the customer's mandate.
- WHMCS's renewal cycle triggers the next invoice; Razorpay charges via the mandate; success/failure via webhook.
Without eMandate setup, every renewal requires customer to manually pay. Configure Subscriptions in your Razorpay module + WHMCS automation.
Step 7 — GST configuration
For Indian customers, your invoices need GST breakdown. See my tax/GST guide — separate setup in WHMCS.
How to verify everything works
- Place an order paying with each method (Card, UPI, NetBanking).
- Confirm invoice marks paid for each.
- Razorpay dashboard shows the transactions.
- Refund one transaction; confirm WHMCS reflects it.
- Test the eMandate flow for recurring.
- Verify GST appears correctly on invoices.
Common pitfalls
"Razorpay charge succeeds but WHMCS invoice unpaid." Webhook isn't reaching WHMCS. Check WAF/Cloudflare blocking Razorpay IPs.
"Subscriptions failing on renewal." Mandate not properly set up at first order, or amount exceeds mandate cap. Customer needs to re-authorize.
"International cards declined." Razorpay supports international cards but each transaction needs explicit enabling in dashboard. Settings → International Payments → Enable.
"Customer pays in USD but Razorpay processes in INR with weird conversion." Your WHMCS is set to USD, "Convert To For Processing" sends INR. Razorpay sees INR amount. The conversion rate WHMCS uses may differ from market. Either bill in INR directly or accept the spread.
My take — gateway combination for India
For hosting brands selling to India:
- Razorpay as primary (covers UPI / NetBanking / cards / wallets).
- PayPal as backup (some Indian customers prefer PayPal for international purchases).
- Don't bother with Stripe India unless you have specific reasons.
For mixed audiences (Indian + international): Razorpay for INR, Stripe for USD. WHMCS supports multi-currency with per-currency gateway preferences.
Going further
I set up Razorpay + WHMCS for Indian hosting brands — KYC guidance, gateway config, subscriptions / eMandates, GST integration. Tell me about your hosting business and I'll send a quote in 24 hours.