# Integrate OpenCart

## Overview

OpenCart is a free open-source eCommerce platform for seasoned web developers looking for a user-friendly interface and for shop owners just launching their online business.

## Availability

OpenCart integration is available only for 2Checkout accounts that handle their own tax and invoice management (2Sell and 2Subscribe accounts).

{% hint style="info" %}
OpenCart 4 is not supported.
{% endhint %}

## Integrate OpenCart with 2Checkout

{% hint style="info" %}
Whether you are an existing merchant using OpenCart and you need to upgrade your integration, or you are a new merchant looking to integrate with 2Checkout, you need to follow the instructions below.
{% endhint %}

### OpenCart Settings

1. Download the 2Checkout payment module from [Github](https://github.com/2Checkout/opencart-2checkout).
2. Upload the files to your server under your store’s directory.<br>

   <div data-with-frame="true"><figure><img src="/files/aYAhOjvg3VQHdF6mgBwy" alt=""><figcaption></figcaption></figure></div>
3. Sign in to your OpenCart admin.
4. Navigate to *Extensions → Installer*.<br>

   <div data-with-frame="true"><figure><img src="/files/1txaig7Y8Dto8WdJY61X" alt=""><figcaption></figcaption></figure></div>
5. On the *Extension Installer* page, click on **Upload** to upload your extension files.<br>

   <div data-with-frame="true"><figure><img src="/files/XBsboHsENW8ZTunyjeuQ" alt=""><figcaption></figcaption></figure></div>
6. Go to *Extensions → Choose the extension type* and select the **Payments** extension type from the drop-down list.<br>

   <div data-with-frame="true"><figure><img src="/files/BttHCcaksvRzbdDiPySh" alt=""><figcaption></figcaption></figure></div>
7. Click **Install** on the payment option you want to use (**2Checkout API**, **2Checkout Convert Plus**, **2Checkout Inline**).
8. Click on the **Edit** button of the selected integration to enable it.<br>

   <div data-with-frame="true"><figure><img src="/files/2q2gDGn97gQCRPJQbqMj" alt=""><figcaption></figcaption></figure></div>
9. Configure your 2Checkout integration by editing the details of the 2Checkout API, 2Checkout ConvertPlus, or 2Checkout InLine, as shown in the next image.
   * Input your **Merchant Code**, **Secret Key**, and **Buy-link Secret Word** from the 2Checkout Merchant Control Panel into the OpenCart admin.&#x20;
   * To obtain the **Merchant Code**, log in to your [2Checkout Merchant Control Panel](https://secure.2checkout.com/cpanel).
   * Navigate to *Integrations → Webhooks & API → Merchant Code* and copy and paste the code into the OpenCart admin area.
   * Then copy and paste the **Secret Key** from the 2Checkout Control Panel into the OpenCart admin.
   * Go to *Integrations → Webhooks & API → Secret Word → Buy-Link secret word* and copy and paste the **buy-link secret word** into the OpenCart admin. <br>

     <div data-with-frame="true"><figure><img src="/files/3T8kHZWbmFiTTltMdmFa" alt=""><figcaption></figcaption></figure></div>
10. Under *Test Mode* select **No** for live sales or **Yes** for test sales.
11. Select **Complete** under *Order Status*.
12. Select **Enabled** under *Status*.
13. **Save** your changes.

### 2Checkout Settings

1. Sign in to your [2Checkout Merchant Control Panel account](https://secure.2checkout.com/cpanel).
2. Navigate to *Dashboard → Integrations → Webhooks & API section.*
3. Make sure to **enable** the IPN webhook notification in your Merchant Control Panel.
   * Log in to the 2Checkout Merchant Control Panel and navigate to Integrations → Webhooks & API<br>

     <div data-with-frame="true"><figure><img src="/files/YjNs5CuZmOsVZR6zBoOs" alt=""><figcaption></figcaption></figure></div>
   * Scroll down to the *Notifications* section and **enable the IPN webhook.**
   * For the *Payment notification type* field, select **IPN** **or Email Text & IPN**, and then click on the **Configure IPN** button.
   * On the [IPN settings page](https://secure.2checkout.com/cpanel/ipn_settings.php), click on the **Add IPN URL** button, input the **IPN URL** available on the configuration page in OpenCart and select the SHA 2 / SHA 3 hash.<br>

     <div data-with-frame="true"><figure><img src="/files/JAj8OmlTFqyV9hieXjrd" alt=""><figcaption></figcaption></figure></div>
   * Enable all triggers and response tags.<br>

     <div data-with-frame="true"><figure><img src="/files/Pgc9tUFBs1yrlzEYTFOU" alt=""><figcaption></figcaption></figure></div>

### 2Checkout PayPal Direct Setup

#### OpenCart Settings

1. Sign in to your OpenCart admin.
2. Click **Extensions** tab and **Payments** subtab.
3. Under *2Checkout PayPal Direct* click **Install** and then click **Edit**.
4. Enter your [**2Checkout Merchant Code**](https://secure.2checkout.com/cpanel/webhooks_api.php).
5. Select **Complete** under *Order Status*.
6. Select **Enabled** under *Status*.
7. Enter your Secret Word (Must be the same value entered on your 2Checkout Site Management page.)
8. Save your changes.

#### 2Checkout Settings

1. Sign in to your 2Checkout account.
2. Navigate to *Dashboard → Integrations → Webhooks & API*
3. Follow these steps to activate Redirect URL:
   * In the *Redirect URL* section check **“Enable return after sale”**
   * For Return method, select **Link in the Thank You Page**
   * Set the **Approved URL** to [http://www.yourstore.com/index.php?r...ckout/callback](http://www.yourstore.com/index.php?route=payment/twocheckout/callback) (Replace [http://www.yourstore.com](http://www.yourstore.com/) with the actual URL to your store.).
   * Click **Update** to **save** your settings

## About OpenCart

OpenCart is a free open-source eCommerce platform for web developers looking for a user-friendly interface and for shop owners just launching their online business. More than 30,000 companies, mostly small and medium businesses from the US, are using OpenCart in the retail industry. OpenCart offers support for both physical and digital products, as well as services.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/connectors/connectors/integrate-opencart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
