Razorpay is a popular payment gateway for businesses in India. It supports credit/debit cards, UPI, net banking, wallets, and EMI — covering all major payment methods used by Indian customers. WP SmartPay Pro integrates Razorpay with its hosted checkout modal.

Prerequisites

  • A Razorpay account. Business verification is required to go live.
  • Your Razorpay Key ID and Key Secret from the Razorpay Dashboard.
  • WP SmartPay Pro with a valid license.
  • HTTPS on your site (required for live payments).

Country Availability

Razorpay is available to businesses registered in India. International customers can pay via card if you enable international payments in your Razorpay account settings.

Finding Your Razorpay API Keys

  1. Log in to your Razorpay Dashboard.
  2. Go to Settings → API Keys.
  3. Click Generate Test Key (for test keys) or Generate Key (for live keys — only available after account activation).
  4. Copy the Key ID and Key Secret.

Connecting Razorpay in SmartPay

  1. Go to SmartPay → Settings → Payment Gateways.
  2. Find Razorpay and tick Enable.
  3. Enter your Live Key ID and Live Key Secret.
  4. Enter your Test Key ID and Test Key Secret.
  5. Click Save Settings.
Screenshot of WP SmartPay Razorpay settings showing Key ID and Key Secret fields for live and test mode
Razorpay settings — enter your Key ID and Key Secret for both live and test environments.

Setting Up Razorpay Webhooks

  1. In your Razorpay Dashboard, go to Settings → Webhooks.
  2. Click Add New Webhook.
  3. Enter the URL: https://yoursite.com/?smartpay-listener=razorpay
  4. Enter a Secret and copy it for SmartPay settings.
  5. Select events: payment.captured, payment.failed, refund.created.
  6. Save the webhook.

Supported Payment Methods

  • Visa, Mastercard, RuPay (credit/debit cards)
  • UPI (Google Pay, PhonePe, Paytm, and all UPI apps)
  • Net banking (50+ Indian banks)
  • Wallets (Paytm, Mobikwik, Freecharge, Airtel)
  • EMI (credit card EMI and cardless EMI)

Supported Currencies

Indian Rupee (INR) for domestic payments. International card payments in USD, EUR, GBP, and other major currencies (requires enabling international payments in Razorpay).

Test Mode Configuration

Toggle Test Mode on in SmartPay. Use Razorpay's test credentials and the following test card:

  • Card: 4111 1111 1111 1111 | Expiry: any future date | CVV: any 3 digits
  • For UPI test: use success (success@razorpay) or failure (failure@razorpay) virtual UPI IDs.

Common Errors & Fixes

  • "Key authentication failed" — Key ID or Secret is incorrect or from the wrong environment (test vs live).
  • Order not created — Check that your Razorpay account is fully verified and activated.
  • Payment stuck at Pending — Webhook not configured or secret mismatch.