API ReferenceIntegrationsKnowledge Base

OpenCart Extension

OpenCart is an easy to-use, powerful, open source online store management program that can manage multiple online stores from a single back-end.

Integrating your OpenCart site with Razorpay allows you to accept payments on your OpenCart 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 extension offers seamless integration, allowing the customer to pay on your website without being redirected. This allows the extension to work across all browsers and ensures compatibility with the latest version of OpenCart.

Currently, we support the following version of OpenCart with separate extensions:


  1. Download a ZIP of the required version of the repository.

    1. The master branch on GitHub holds the extension for OpenCart 2. Tags are opencart2-2.x.y.

    2. The opencart1.5 branch on GitHub holds the extension for Opencart 1.5. Tags are opencart1.5-1.x.y.

  2. Copy all files/folders recursively to opencart installation directory.

  3. Log into OpenCart.

  4. Navigate to the Admin Panel then to Extensions and Payments and install the Razorpay gateway extension.

  5. Click Edit next to Razorpay and do the following:

    1. Enter your Razorpay <key_id> and <key_secret>. These can be generated from your Dashboard.
    2. Change extension status to Enabled.
    3. Click Save to save the extension settings.

Generate API Key#

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

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.

Watch the short animation below for more information.

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.