Connect Razorpay to WooCommerce in India (2026)

8 min read · India

What you’ll have at the end

Razorpay's WooCommerce plugin installed on your store, connected with your Razorpay Test Mode keys, and checked with a test payment.

Razorpay's help says no money is deducted in a test payment. This guide stops there. When you're ready to take real payments, please generate Live Mode keys and replace the test keys, as Razorpay's help describes.

Before you start

You’ll need

  • A WooCommerce store on WordPress, and a WordPress login that can install plugins and change WooCommerce settings
  • A Razorpay account with KYC approved and your business activated, as Razorpay's WooCommerce page asks
  • A Razorpay login with the Owner or Admin role, because Razorpay's help says only those roles can see the API keys
  • A safe place, such as a password manager, to keep your Key secret

What it costs. Razorpay's WordPress.org listing says it has no setup fees and no monthly fees, and that you are charged when you earn money. Razorpay's help lists no charge for the plugin itself. Test payments move no money.

Razorpay's WooCommerce page lists these checks before you configure the plugin: - Your Razorpay account is created and your KYC is approved. - You have activated your business after Razorpay's business activation email. - You have generated your API keys from the Razorpay Dashboard.

Razorpay's help says only users with the Owner or Admin role can see the API keys.

Razorpay's help says you can generate Test Mode keys without adding a website. To generate Live Mode keys you must give Razorpay your website details. Razorpay's help says it will verify your website within 3 working days, according to Razorpay's API keys page. This guide uses Test Mode keys, so it doesn't wait for that.

Razorpay's WooCommerce page also lists these requirements: - WordPress 3.9.2 or higher and WooCommerce 4.0 or higher. - The php-cURL extension on your hosting.

If you're not sure about these, please ask your hosting provider.

Razorpay's help says the plugin supports only currencies that use 2 decimal units, such as INR.

Razorpay's help says you can reuse the same Live Mode keys on more than one website, and that it strongly recommends Test Mode keys when you integrate Razorpay on a new website.

You'll move between Razorpay and WooCommerce. Each step's heading names the tool it happens in: Razorpay for steps 1 to 4 and 16, and WooCommerce for steps 5 to 15.

Following steps from somewhere else? You’re welcome to bring them here.

Steps

  1. 1. Razorpay: log in and choose Test Mode

    Please log in to your Razorpay Dashboard with a login that has the Owner or Admin role.

    Razorpay's help says to select the mode you want to generate keys for. Please choose Test Mode, which Razorpay describes as a simulation mode for testing your integration. Razorpay's help says customers can't make payments in this mode.

  2. 2. Razorpay: go to Account & Settings and open API Keys

    Go to Account & Settings, then open API Keys, which Razorpay's help places under Website and app settings.

  3. 3. Razorpay: click Generate Key

    Click Generate Key for the mode you chose.

  4. 4. Razorpay: save your Key Id and Key secret (asks for API key details)

    You can pause screen sharing while you fill in this page, and continue afterwards.

    If you're sharing your screen, you can pause sharing for this part and continue afterwards.

    Razorpay's help says that after you generate the keys, you should download and save them securely. It also says that only the Key Id stays visible on the Dashboard afterwards, not the Key secret.

    Razorpay's help says not to share your API key secret with anyone or on any public platform. Razorpay also says API keys act like passwords, so please keep the Key secret private like a password.

    Please do not close this screen until the keys are saved. If you lose the Key secret, Razorpay's help says you must regenerate the keys and update every place that used the old ones.

  5. 5. WooCommerce: open Plugins and search for the plugin

    Now please switch to WooCommerce.

    Log in to your WordPress admin. Open the Plugins menu and choose the option to add a new plugin.

    Search for Razorpay for WooCommerce. Razorpay's help says to install its plugin from the WordPress Plugin Directory. The WordPress.org listing is published by Razorpay and describes itself as the official Razorpay payment gateway plugin for WooCommerce.

  6. 6. WooCommerce: click Install Now

    Find Razorpay for WooCommerce in the results and click Install Now.

  7. 7. WooCommerce: click Activate

    When the button changes, click Activate. WooCommerce's help on installing a plugin from the directory describes this same button change.

  8. 8. WooCommerce: go to WooCommerce > Settings > Payments and open Razorpay

    WooCommerce's help says to go to WooCommerce > Settings > Payments to enable payment providers and configure their settings. Razorpay's help says to click Razorpay to edit its settings.

    WooCommerce's help says you choose Enable to turn on an available provider and Manage to configure one that is already enabled.

    Razorpay's help describes this as the Checkout/Payment Gateways tab. Newer WooCommerce screens call the tab Payments.

  9. 9. WooCommerce: turn on the payment method

    Please turn on the option that enables the Razorpay payment method. Razorpay's help says to name it "Credit Card/Debit Card/Internet Banking", and that this name is shown on the payment page your customer sees.

  10. 10. WooCommerce: enter your Key id and Key secret (asks for API key details)

    You can pause screen sharing while you fill in this page, and continue afterwards.

    If you're sharing your screen, you can pause sharing for this part and continue afterwards.

    Please enter the Test Mode keys you saved in step 4 into Key id and Key Secret. Please keep the Key secret private like a password, and do not paste it anywhere public.

    Razorpay's help says the webhook is set up automatically when you enter and save the Key ID and secret.

  11. 11. WooCommerce: set Payment Action

    Razorpay's help says to set Payment Action to Authorize and Capture, so that payments are captured automatically.

    Razorpay's help warns about the other choice, Authorize. Payments you don't capture within 5 days of authorisation are automatically refunded to the customer, and you receive nothing.

  12. 12. WooCommerce: save your changes

    Please save the settings on this page.

  13. 13. WooCommerce: look for Razorpay at checkout

    Please open your store as a customer, add a product to the cart, and go to checkout.

    Check that Razorpay appears as a payment option. Razorpay's help says that if you can't see it, you should update the plugin to the latest version.

    Please do not pay with a real payment method on this store while it still uses Test Mode keys. Razorpay's help says that if you go live with test keys, customers see a payment success screen but no payment is captured or settled.

  14. 14. WooCommerce: start the test payment and choose Netbanking

    Choose Razorpay and continue to payment. Razorpay's help says a Pay button appears. Please click it.

    Razorpay's help says you can test with any payment method configured at checkout. Please choose Netbanking and select any bank in the list.

  15. 15. WooCommerce: complete the test payment on the mock page

    Razorpay's help says that in Test Mode you are redirected to a mock page where you can make the payment a success or a failure, and that you are not sent to a bank login. Please choose the success option.

    Razorpay's help says no money is deducted, because this is a simulated transaction.

  16. 16. Razorpay: check the payment in your Dashboard

    Now please go back to Razorpay.

    Go to Transactions > Payments. Razorpay's help says to check that a payment ID has been generated and to note its status, and that a successful payment is marked as captured.

    This guide ends here. To take real payments, Razorpay's help says to switch to Live Mode, generate Live Mode keys under Account & Settings > API Keys > Generate Key, and replace the test keys in the plugin settings, then save.

If something looks different

  • Razorpay's help says that if you regenerate your API keys, you should enter and save the new keys on the plugin settings page, so the webhook is set up again.
  • Razorpay's help says the webhook events are set up when you save your keys. It says to check in your Dashboard under Account & Settings > Webhooks that they are enabled.
  • The error "The API key provided is invalid": Razorpay's help says to check that the API keys you entered in WordPress are accurate.
  • The error "Authentication failed": Razorpay's help says this happens when the keys differ, and to check the key entered for your website matches the one generated in the Dashboard.
  • A 404 page at checkout after choosing Razorpay: Razorpay's help says to check in WooCommerce > Settings > Advanced that the Cart page and Checkout page are linked correctly.
  • Razorpay's help says the plugin supports Checkout Blocks.
  • Razorpay's page doesn't say which Dashboard mode lists the test payment. If you can't find it, please check the other mode, or ask Razorpay's support.
  • WooCommerce's own help names the add-plugin option Add New in some pages and Add New Plugin in others. Please use whichever your admin shows.
  • If the plugin isn't working properly, Razorpay's help suggests deactivating and deleting it, then reinstalling it from WordPress.org.