Razorpay is ideal for sites accepting payments in India. It supports UPI, net banking, debit/credit cards, and wallets alongside INR payments — giving your Indian advertisers access to all their preferred payment methods in one integration.
Requirements
- A Razorpay business account (free to create)
- KYC verification completed in Razorpay Dashboard
- Your WordPress site on HTTPS
Step 1: Create a Razorpay Account
- Go to razorpay.com and sign up
- Complete the KYC verification process
- Activate your account
You can start testing with a non-activated account using test mode keys.
Step 2: Get Your API Keys
- Log into your Razorpay Dashboard
- Go to Settings -> API Keys
- Click Generate Test Key (for testing) or Generate Live Key (for production)
- Copy your:
- Key ID — starts with
rzp_test_orrzp_live_ - Key Secret — shown only once, save it immediately
Never share your Key Secret with anyone.
Step 3: Configure in WordPress
- Go to WB Ad Manager -> Pro Settings -> Payments
- Enable Razorpay
- Enter your credentials:
| Field | Value |
|---|---|
| Key ID | rzp_test_... or rzp_live_... |
| Key Secret | Your Razorpay secret key |
- Click Save Settings
Step 4: Set Up the Webhook
Webhooks ensure your site is notified immediately when a payment completes, so wallet credits happen without delay.
- In Razorpay Dashboard, go to Settings -> Webhooks
- Click Add New Webhook
- Enter your webhook URL:
https://yoursite.com/wp-json/wbam-pro/v1/razorpay/webhook - Select these events:
payment.capturedpayment.failed- Set a Secret for the webhook (any strong password)
- Copy the secret and paste it into the Webhook Secret field in your WordPress settings
- Click Save Settings
Step 5: Test Mode vs. Live Mode
Test mode — Use keys starting with rzp_test_. No real money moves. Razorpay provides test card numbers in their documentation.
Live mode — Use keys starting with rzp_live_. Real payments are processed. Switch to live mode only after thorough testing.
To switch modes, replace your keys in WB Ad Manager -> Pro Settings -> Payments with the appropriate set.
Currency
Razorpay primarily supports INR (Indian Rupee). Set your site currency to INR in WB Ad Manager -> Pro Settings -> General before going live.
Troubleshooting
Payment popup doesn’t open
- Confirm your Key ID is correct and starts with
rzp_ - Check your browser console for JavaScript errors
- Confirm HTTPS is active on your site
Wallet not crediting after payment
- Verify your webhook URL is publicly accessible
- Confirm the webhook secret matches in both Razorpay and WordPress settings
- Check the Razorpay Dashboard webhook log for delivery status
“Authentication failed” error
- Regenerate your API keys in Razorpay Dashboard
- Copy the keys again without any spaces
- Confirm you’re using test keys in test mode and live keys in live mode
Next Steps
- Payment Configuration — configure other gateways
- Manual & Bank Transfer — set up offline payments
