Razorpay Gateway Setup

Get Started

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

  1. Go to razorpay.com and sign up
  2. Complete the KYC verification process
  3. Activate your account

You can start testing with a non-activated account using test mode keys.

Step 2: Get Your API Keys

  1. Log into your Razorpay Dashboard
  2. Go to Settings -> API Keys
  3. Click Generate Test Key (for testing) or Generate Live Key (for production)
  4. Copy your:
  5. Key ID — starts with rzp_test_ or rzp_live_
  6. Key Secret — shown only once, save it immediately

Never share your Key Secret with anyone.

Step 3: Configure in WordPress

  1. Go to WB Ad Manager -> Pro Settings -> Payments
  2. Enable Razorpay
  3. Enter your credentials:
Field Value
Key ID rzp_test_... or rzp_live_...
Key Secret Your Razorpay secret key
  1. 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.

  1. In Razorpay Dashboard, go to Settings -> Webhooks
  2. Click Add New Webhook
  3. Enter your webhook URL:
    https://yoursite.com/wp-json/wbam-pro/v1/razorpay/webhook
  4. Select these events:
  5. payment.captured
  6. payment.failed
  7. Set a Secret for the webhook (any strong password)
  8. Copy the secret and paste it into the Webhook Secret field in your WordPress settings
  9. 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

Last updated: March 4, 2026