API ReferenceIntegrationsKnowledge Base

OpenCart Extension

OpenCart is an easy-to-use and powerful open source online store management program that can manage multiple online stores from a single admin interface. OpenCart is a module-based system which allows you to easily extend the functionality as per your needs.

Integrating your OpenCart site with Razorpay allows you to accept payments via the Razorpay Payment Gateway. You can accept payments via debit card, credit card, netbanking (supports 3D Secure), Unified Payments Interface (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 versions of OpenCart with separate extensions:


  1. Download the latest Source code zip file of the required version of the plugin.
    1. Download the latest release of the OpenCart 3 plugin from the Releases section in GitHub. Tags for OpenCart 3 are opencart3-1.x.y.
    2. For OpenCart 2, download this release from GitHub. Tags for OpenCart 2 are opencart2-3.x.y.
    3. For OpenCart 1.5, download this release from GitHub. Tags for OpenCart 1.5 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 and then to Extensions and Payments to install the Razorpay Payment Gateway extension.
  5. Click Edit and complete the following steps:
    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#

  1. Log into your Dashboard with appropriate credentials.
  2. Select the mode (Test or Live) for which you want to generate the API key. Note:
    You have to generate separate API Keys for the test and live modes. No real money is used in test mode.
  3. Navigate to SettingsAPI KeysGenerate Key to generate key for the selected mode.

The Key Id and Key Secret appear in a pop-out window as shown below:

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.