WooCommerce Plugin

WooCommerce is an open source, completely customizable ecommerce platform for entrepreneurs worldwide.

Integrating your WooCommerce site with Razorpay allows you to accept payments on your WooCommerce site via the Razorpay Payment Gateway. You can accept payments via debit card, credit card, netbanking (supports 3D Secure), UPI or through any of our supported wallets.

The plugin offers seamless integration, allowing the customer to pay on your website without being redirected. This allows the plugin to work across all browsers and ensures compatibility with the latest version of WooCommerce.

If you are not using WooCommerce, we have a native plugin for WordPress too!

Compatibilities and Dependencies#

  • Wordpress v3.9.2 or higher
  • Woocommerce v2.4 or higher
  • PHP v5.6.0 or higher
  • php-curl


  • To use this plugin, you will need to make network calls. Ensure that you have the php-curl extension installed to make the required network calls.
  • The plugin has been tested using WooCommerce v4.8.


  1. Log into your WordPress account and activate the Razorpay plugin in the WordPress Plugin Manager.
  2. Log into your the WooCommerce account, navigate to Settings and click the Checkout/Payment Gateways tab.
  3. Click Razorpay to edit the settings.
  4. Enable the Payment Method, name it Credit Card / Debit Card / Internet Banking (this is shown on the payment page your customer sees).
  5. Add in your <key_id> and <key_secret>. These can be generated from your Dashboard.
  6. Set the Payment Action to Authorize and Capture to auto-capture payments. If you want to capture payments manually from the Dashboard after manual verification, set the Payment Method to Authorize.

Generate API Key#

To generate API key:

  1. Log into your Dashboard.
  2. Select the mode for which you want to generate the API key from the menu ribbon.

  3. Navigate to Settings.
  4. Click API Keys.
  5. Click Generate Key to generate key for the selected mode.

The Key Id and Key secret appear in a pop-out window. You also have the option to download the Key Details.

After generating the keys from the Dashboard, download and save them securely. If you do not remember your API Keys, you need to re-generate it from the Dashboard and replace it wherever required.

You have to generate separate API Keys for the test and live mode. No money is deducted from your account in test mode.


The Razorpay WooCommerce plugin is released under the GPLv2 license, same as that of WordPress.

Click here for details about the license. You can also refer to the license text in the license file on GitHub.