# Integrate WHMCS

## Overview

WHMCS is an all-in-one Content Management System including client management, billing & support solution for online businesses and web hosts.​

Merchants can use the WHMCS connector to integrate with 2Checkout and process orders via [ConvertPlus](https://verifone.cloud/docs/2checkout/Documentation/07Commerce/2Checkout-ConvertPlus/), [InLine Checkout](https://verifone.cloud/docs/2checkout/Documentation/07Commerce/InLine-Checkout-Guide/), and [2Pay.js](https://verifone.cloud/docs/2checkout/API-Integration/2Pay.js-payments-solution/), and provide an improved experience to their shoppers.​

## Availability

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

## WHMCS Settings

Regardless of the fact that you are already using the WHMCS connector or you want to start using it to integrate with 2Checkout, follow the steps below:

1. Download the 2Checkout payment module from [GitHub](https://github.com/2checkout/whmcs) by clicking on the **Code** button and then on **Download ZIP.**<br>

   <div data-with-frame="true"><figure><img src="/files/bwSgciyxlri0dAOzcy2j" alt=""><figcaption></figcaption></figure></div>
2. Sign in to your WHMCS admin panel.
3. Navigate to *Setup → Payments* and click on **Payment Gateways.**<br>

   <div data-with-frame="true"><figure><img src="/files/GBTaRKsoCL3aed8PF6Lu" alt=""><figcaption></figcaption></figure></div>
4. On the *Payment Gateways* page, click on the **All Payment Gateways** tab.<br>

   <div data-with-frame="true"><figure><img src="/files/rHoK9qT49BhDM6ry7fZI" alt=""><figcaption></figcaption></figure></div>
5. On the *All Payment Gateways* page, select 2Checkout's **ConvertPlus**, **InLine Checkout**, and **API Gateway** (2Pay.js).<br>

   <div data-with-frame="true"><figure><img src="/files/N4n3nohPO6j7jXY0mKYT" alt=""><figcaption></figcaption></figure></div>
6. Go to *Manage Existing Gateways* and **configure** **each cart option** by adding the required information from your [2Checkout Merchant Control Panel](https://secure.2checkout.com/cpanel/).<br>

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

   * Tick the **Show on Order Form** box if you want this information to be displayed on the order.
   * Add the **Merchant Code**.
   * Add the **Buy-Link Secret Word**.
   * Add the **Secret key**.
   * Tick **Test Mode** if you wish to enable it. This allows you to place test orders using [test payment methods](https://verifone.cloud/docs/2checkout/Documentation/09Test_ordering_system/01Test_payment_methods/), to check your integration with 2Checkout.
   * Tick the **Skip 2CO Fraud Check** box, if you want to mark invoices as paid without waiting for the 2Checkout fraud review.
   * Add **Reasons for Refunds**.
   * Click on **Save Changes**.

{% hint style="info" %}

* The Merchant Code is your 2Checkout Merchant Code that you can obtain by logging in to your [Merchant Control Panel ](https://secure.2checkout.com/cpanel/)and navigating to Integrations → Webhooks & API.&#x20;
* To find the Buy-Link Secret Word, log  in to your 2 Checkout [Merchant Control Panel ](https://secure.2checkout.com/cpanel/)and navigate to Integrations → Webhooks & API → Secret Word . Edit your INS Secret Word to match the Buy-Link Secret Word , copy the value and paste it in the WHMCS admin panel.
* The Secret key can be found in your [2Checkout Merchant Control Panel](https://secure.2checkout.com/cpanel/), right next to the Merchant Code. Copy and paste it in your  WHMCS admin panel.
  {% endhint %}

<div data-with-frame="true"><img src="/files/58a398d3deb30015709271267de652749449443f" alt=""></div>

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

{% hint style="warning" %}
Since WHMCS does not support special characters, but only letters (a-z) and digits, you can use a [code generator](https://www.randomcodegenerator.com/en/generate-codes) to obtain a Secret Word that needs to be saved both in the 2Checkout Control Panel and the WHMCS admin.&#x20;
{% endhint %}

## 2Checkout Settings

Follow the instructions below to finalize the WHMCS integration process.

1. Sign in to your 2Checkout Merchant Control Panel account.
2. Navigate to *Dashboard → Integrations → Webhooks & API section.*<br>

   <div data-with-frame="true"><figure><img src="/files/75y5OrkiszjU12wmvstd" alt=""><figcaption></figcaption></figure></div>
3. Follow these steps to activate Redirect URL:
   * In the *Redirect URL* section check **Enable return after sale**.
   * For the return method, select **Header Redirect** (for both Standard and Inline checkout).
   * Set the *Approved URL* to [http://www.yourdomain.com/whmcs/modu.../2checkout.php](http://www.yourdomain.com/whmcs/modules/gateways/callback/2checkout.php) (replace [http://yourdomain.com](http://yourdomain.com/) with the actual URL to your domain).
   * **Save** settings.
4. In the *Webhooks and API* section, under the *Instant Notification Service (INS)* card, check the **Enable Global URL** box.<br>

   <div data-with-frame="true"><figure><img src="/files/LLGbXeMyQ3wjlodcWCbY" alt=""><figcaption></figcaption></figure></div>
5. Enter [http://www.yourdomain.com/whmcs/modu.../2checkout.php](http://www.yourdomain.com/whmcs/modules/gateways/callback/2checkout.php) as the global endpoint URL.
6. Click on **Update** to save your changes.
7. Make sure to enable the [IPN webhook notification in your Merchant Control Panel](https://secure.2checkout.com/cpanel/webhooks_api.php).
   * Log in to the 2Checkout Merchant Control Panel and navigate to *Integrations → Webhooks & API*.
   * Scroll down to the *Notifications* section and select **IPN** or **Email Text & IPN** from the drop-down, and then click on the **Configure IPN** button.
   * On the [IPN Settings page](https://secure.2checkout.com/cpanel/ipn_settings.php), click on **Add IPN URL**.
   * Input the IPN URL available in the configuration page in the WHMCS admin, select the SHA 2 / SHA 3 hash and click on **Add IPN**.<br>

     <div data-with-frame="true"><figure><img src="/files/y1sWgKKLpiEDomsf2uAZ" alt=""><figcaption></figcaption></figure></div>
   * After adding the IPN URL, the URL should be displayed in the IPN URLs section in your Merchant Control Panel.<br>

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

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

## About WHMCS

WHMCS is an all-in-one client management, billing & support solution for online businesses. Handling everything from signup to termination, WHMCS is a powerful business automation tool that puts you firmly in control.

For more information visit [WHMCS.com](http://www.whmcs.com/).


---

# 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-whmcs.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.
