← Back to Blog

A Step-by-Step Guide to Integrating Razorpay with Your WooCommerce Store in India

By WovLab Team | February 25, 2026 | 12 min read

Why Razorpay is a Top Choice for Indian WooCommerce Businesses

Navigating the digital payment landscape in India can be complex, but for businesses running on WooCommerce, selecting the right payment gateway is a critical decision that directly impacts conversions and operational efficiency. This woocommerce razorpay integration guide india is designed to walk you through the process seamlessly. While several gateways operate in India, Razorpay has carved out a significant niche, particularly for its robust technology, developer-friendly APIs, and a suite of products tailored for the Indian market. It’s not just a payment processor; it’s a comprehensive financial ecosystem. Unlike some international gateways that have retrofitted their services for India, Razorpay was built here, with an intrinsic understanding of local payment behaviors. It supports a vast array of payment methods, including UPI (which accounts for a massive volume of digital transactions), all major domestic and international cards, net banking with over 50 banks, and popular digital wallets. This ensures that no customer is lost at checkout due to a missing payment option.

Choosing a payment gateway is an investment in your customer experience. A smooth, trustworthy checkout process is as important as the product itself. Razorpay's familiarity and brand trust within India can significantly reduce cart abandonment.

Let's look at a quick comparison to understand its positioning against other popular Indian gateways:

Feature Razorpay PayU CCAvenue
Standard Transaction Fee (Domestic) 2% per successful transaction 2% + GST per transaction 2% on most instruments
WooCommerce Plugin Quality Excellent, frequently updated, and feature-rich. Good, but can sometimes lag behind Razorpay in features. Functional, but often considered less user-friendly.
UPI AutoPay / Subscriptions Yes, via Razorpay Route & Subscriptions Yes, available Yes, available
Settlement Time T+2 working days (T+1 available with RazorpayX) T+2 to T+3 working days T+3 working days
Ease of Integration Very high, with clear documentation and sandbox. High, with good support. Moderate, documentation can be less intuitive.

For a typical WooCommerce store owner, Razorpay’s clear pricing, superior plugin, and the powerful RazorpayX dashboard for managing payouts and finances make it an exceptionally compelling choice. It simplifies the entire cash flow, from payment acceptance to vendor payouts and payroll, all within one unified platform.

Prerequisites: What You Need Before You Start the Integration

Before diving into the technical steps, a bit of preparation is essential to ensure a smooth integration process. Think of this as gathering your ingredients before cooking; having everything ready prevents unnecessary delays and frustration. Rushing into the setup without these foundational elements can lead to activation issues or compliance problems down the line. First and foremost, your business needs to be a registered entity in India. This could be a Proprietorship, Partnership, LLP, or a Private Limited Company. You will need the corresponding legal documents for the KYC (Know Your Customer) process that Razorpay is legally required to perform.

Here is a simple checklist of what you need to have on hand:

Do not underestimate the importance of the SSL certificate. Browsers will display prominent warnings on non-secure checkout pages, and payment gateways like Razorpay will simply refuse to operate in an insecure environment. This is a basic, mandatory step for any e-commerce business.

Once you have all these components ready, you can proceed with the confidence that you won't hit any administrative roadblocks during the integration. The KYC verification on Razorpay's end can take a few business days, so it's wise to start this process in parallel as you set up the technical side.

A Complete WooCommerce Razorpay Integration Guide for India: Step-by-Step

With the prerequisites sorted, it's time to get your hands dirty and connect Razorpay to your WooCommerce store. The official Razorpay plugin makes this process remarkably straightforward. Follow these steps carefully to get your payment gateway up and running. This is the core of our woocommerce razorpay integration guide india, designed to be clear and actionable.

  1. Download the Official Plugin: First, log in to your WordPress dashboard. Navigate to Plugins > Add New. In the search bar on the right, type "Razorpay for WooCommerce". The official plugin, usually named "Razorpay for WooCommerce" by "Team Razorpay," should be the first result.
  2. Install and Activate: Click the "Install Now" button. WordPress will download and install the plugin. Once it's done, the button will change to "Activate." Click it to activate the plugin on your site.
  3. Locate the Settings: After activation, you need to configure the plugin. Go to WooCommerce > Settings and click on the Payments tab. You will now see Razorpay listed as one of the available payment methods.
  4. Enable and Get API Keys: Click on "Razorpay" to open its settings page. The first thing you need to do is enable it. Then, you'll see fields for Key ID and Key Secret. To get these, log in to your Razorpay Dashboard. Navigate to Settings > API Keys. Generate a new set of API keys if you don't have one already. Important: Copy the Key Secret immediately and save it somewhere secure. Razorpay will only show it to you once.
  5. Enter API Keys and Configure: Copy the Key ID and Key Secret from your Razorpay dashboard and paste them into the corresponding fields in your WooCommerce settings. While you are here, you can configure other settings:
    • Payment Action: You can choose to "Authorize and Capture" the payment immediately or just "Authorize" it to capture the funds later manually from your WooCommerce orders page. For most businesses selling digital or physical goods, "Authorize and Capture" is the standard choice.
    • Enable Webhooks: This is a crucial step. In your Razorpay dashboard under Settings > Webhooks, create a new webhook. The URL you need to enter is provided in the plugin settings page on WooCommerce. Set the active events to include `payment.authorized`, `payment.failed`, and `refund.created`. A webhook ensures that your WooCommerce store is automatically updated about payment statuses even if the customer closes their browser prematurely after paying.
  6. Save and Verify: After filling in all the details, click "Save changes." Your Razorpay gateway should now be active. Go to your checkout page to confirm that the option to pay via Razorpay is visible to customers.

By following these steps, you have successfully integrated Razorpay. The next logical step is to ensure it works as expected before you start accepting real payments from your customers.

How to Run a Sandbox Transaction to Test Your Payment Gateway

Never, ever go live with a new payment gateway without testing it first. A failed payment is a lost sale and a major blow to customer confidence. Razorpay provides an excellent, fully-functional Sandbox Mode for this exact purpose. This allows you to simulate entire transaction flows without moving any real money. Following this part of the guide is critical for a smooth launch.

Here’s how to conduct a thorough test:

  1. Enable Test Mode in Razorpay: Log in to your Razorpay dashboard. At the top of the left-hand navigation menu, you'll see a toggle for "Live Mode" and "Test Mode." Switch it to Test Mode.
  2. Generate Test API Keys: Just like you generated Live keys, you need to generate a separate set of API keys for Test Mode. In your Razorpay dashboard (while in Test Mode), go to Settings > API Keys and generate a new set of keys.
  3. Update WooCommerce with Test Keys: Go back to your WordPress dashboard: WooCommerce > Settings > Payments > Razorpay. Replace your Live Key ID and Live Key Secret with the new Test Key ID and Test Key Secret. Don't worry, you can switch them back later. Save the changes. Your store is now connected to the Razorpay sandbox.
  4. Simulate a Customer Purchase: Open your website in a new incognito window to simulate a real customer experience. Add a product to your cart and proceed to checkout. Fill in the customer details and select Razorpay as the payment method.
  5. Use Test Card Details: When the Razorpay checkout popup appears, you need to use test payment credentials. Razorpay provides a comprehensive page with test card numbers for various scenarios (successful payment, failed payment due to insufficient funds, etc.) and test UPI/net banking details. You can find these by searching for "Razorpay test card details" online. Enter a test card number, any future expiry date, and any 3-digit CVV.
  6. Verify the Outcome:
    • For a successful transaction: The payment should go through, and you should be redirected to your WooCommerce "Order Received" page. Check your WooCommerce Orders section; a new order should appear with the status "Processing." Also, check your Razorpay Test Mode dashboard; you should see the successful transaction recorded.
    • For a failed transaction: Use a test card designed to fail. The Razorpay checkout should display an appropriate error message, and you should be returned to the checkout page to try again. The order in WooCommerce should be marked as "Failed."
  7. Switch Back to Live Mode: Once you are fully satisfied that the integration is working correctly, repeat step 3. This time, put your original Live Key ID and Live Key Secret back into the WooCommerce settings. Your store is now ready to accept real payments.
A common mistake is forgetting to switch back to Live API keys after testing. This results in you thinking you're getting paid, while all transactions are just simulations in the sandbox. Always double-check that you are in Live Mode before announcing your store is open for business.

Troubleshooting Common Razorpay Integration Errors

Even with a smooth plugin, issues can sometimes arise during or after the integration. These are often due to simple misconfigurations. Panicking is not an option; a methodical approach is. Understanding the common points of failure can help you resolve them quickly. This troubleshooting table covers some of the most frequent errors encountered by store owners during their woocommerce razorpay integration guide india journey.

Error Symptom / Message Common Cause Solution
"Bad request - payment_failed" or API key-related errors on checkout. This is almost always a mismatch between the API keys entered in WooCommerce and the mode (Test/Live) selected in the Razorpay dashboard. Ensure that if your Razorpay dashboard is in Live Mode, you are using Live API Keys in WooCommerce. If you are in Test Mode, you must use Test API Keys. They are not interchangeable. Copy and paste them again carefully to avoid any typos.
Payment is successful on Razorpay but the order is stuck on "Pending payment" in WooCommerce. This is a classic symptom of a Webhook failure. The communication from Razorpay back to your store is not happening correctly. Go to your Razorpay dashboard > Settings > Webhooks. Check if the webhook URL is correct (it should point to your site) and that it's active. Check the logs for any failures. Also, ensure you don't have a security plugin or firewall on your server that might be blocking requests from Razorpay's servers.
The Razorpay payment option does not appear on the checkout page. There are a few possible causes: 1) The plugin is not enabled. 2) The store currency is not supported. 3) A plugin conflict. First, go to WooCommerce > Settings > Payments and ensure Razorpay is enabled. Second, confirm your store's currency (in WooCommerce > Settings > General) is set to INR (Indian Rupee). Razorpay will not activate for unsupported currencies. If both are correct, try temporarily deactivating other plugins (especially caching or security plugins) to see if there's a conflict.
Customers see a "Payment amount is less than the minimum" error. Razorpay, like most gateways, has a minimum transaction amount (usually ₹1). This error occurs if a customer is trying to check out with a total amount less than this. This is rarely an integration issue but a pricing or cart logic one. Ensure your products are priced above the minimum, or consider implementing a minimum order value on your store if you sell very low-priced items.
When troubleshooting, your first step should always be to check the logs. Both WooCommerce (under WooCommerce > Status > Logs) and Razorpay (in the dashboard) provide detailed logs that can often point you directly to the source of the problem.

Working through these common issues methodically will resolve the vast majority of problems you might face. If an issue persists, it might be time to look for expert assistance.

Need Help? Get Expert WooCommerce & Razorpay Integration Support

Running a successful e-commerce business requires you to focus on your products, customers, and marketing. While this woocommerce razorpay integration guide india provides a comprehensive roadmap, sometimes you hit a roadblock that’s not in the manual. A persistent error, a complex customisation need, or simply a lack of time can make a DIY approach more costly than it seems. This is where professional expertise becomes invaluable. Your payment gateway is the cash register of your online store; it needs to be reliable, secure, and efficient. Any friction in this process leads directly to lost revenue.

At WovLab, we are more than just a digital agency; we are your strategic partners in growth. Based in India, we have a deep and practical understanding of the local e-commerce ecosystem. Our team has executed countless integrations, and we specialize in making complex systems work together seamlessly. Whether you're facing a stubborn integration bug, need to set up subscription billing, or want to build a completely custom checkout flow, our developers have the experience to get it done right.

Your time is best spent growing your business, not wrestling with API keys and webhook logs. A small investment in expert help can save you countless hours of frustration and prevent lost sales.

Our services go far beyond just payment integrations. As a full-service digital agency, we can help you with:

If you want to ensure your Razorpay and WooCommerce setup is flawless, or if you're ready to take your entire e-commerce operation to the next level, contact WovLab today. Let our experts handle the technical complexities so you can focus on what you do best: selling.

Ready to Get Started?

Let WovLab handle it for you — zero hassle, expert execution.

💬 Chat on WhatsApp