1. Build Integration

Steps to integrate your OpenCart Extension with Razorpay Payment Gateway.


Follow the steps given below to integrate Razorpay Payment Gateway with your OpenCart Extension.

  1. Download the latest Source code zip file of the required version of the plugin.
    1. Download the latest release of the OpenCart 4 plugin from the

      in GitHub. Tags for OpenCart 4 are opencart4-6.x.y.

      Watch Out!

      When installing the Razorpay plugin for Opencart 4, ensure that your zip folder only contains the following folders and file, with no hidden files:

      • admin/
      • catalog/
      • system/
      • install.json
    2. Download the latest release of the OpenCart 3 plugin from the

      in GitHub. Tags for OpenCart 3 are opencart3-1.x.y.

    3. For OpenCart 2,

      from GitHub. Tags for OpenCart 2 are opencart2-3.x.y.

    4. For OpenCart 1.5,

      from GitHub. Tags for OpenCart 1.5 are opencart1.5-1.x.y.

  2. Navigate to ExtensionsInstaller and click Upload. Choose the zip file.

Configure OpenCart as given below:

  1. Log in to .
  2. Navigate to the Admin PanelExtensionsPayments to install the Razorpay Payment Gateway extension.
  3. Click Edit. Complete the following steps:
    1. Add in your Key_ID and Key_Secret generated from the .
    2. Change extension status to Enabled.
    3. Click Save to save the extension settings.

Handy Tips

Webhook is auto-configured on OpenCart 3 (versions 5.0.0 and above) and OpenCart 4 when you enter and save the API key ID and secret on the plugin settings page. You need to verify if webhooks are enabled on your

.
However, for versions lower than 5.0.0, you must .

Create a Cron for Webhook using cpanel, follow the steps given below:

  1. Log on to your cPanel Interface.
  2. Go to Advanced section.
  3. Click Cron Jobs.
  4. Select the specific time from the lists provided (every 5 minutes).
  5. Enter https://<shop_url>/index.php?route=extension/payment/razorpay/rzpWebhookCron/ in the Command field.

For more information about Cron, refer to

.

You can track the payment status from the Razorpay Dashboard or poll our APIs.

  1. Log in to the and navigate to TransactionsPayments.
  2. Check if a payment_ID has been generated and note the status. In case of a successful payment, the status is marked as captured.

to check the payment status.

Step 2:


Is this integration guide useful?