CloudFlare Reseller WHMCS Module

From WHMCS Global Services Module Documentation
Jump to: navigation, search

Getting Started

WGS Cloudflare Reseller WHMCS Module is an amazing module that allows your customers to add websites to Cloudflare and to manage them from WHMCS. Additionally, Your customers can also manage websites from WHMCS which are already added to Cloudflare.


  • WHMCS V7 or V8.x.x
  • WHMCS DB User must have all permissions of the DB before installation and activation of this ADDON.
  • GRANT ALL PRIVILEGES ON db_base.* TO db_user @'localhost' IDENTIFIED BY 'db_passwd';
  • Cloudflare Reseller Account

How to get API key?t

  1. Login to your Cloudflare account
  2. Go to "My Profile".
  3. Go to "API Token".
  4. Scroll down to "API Keys".
  5. Click on the "View" button to see your API identifier (Global API Key).

How to download the module files?

1. Log in to your WGS client area

2. Go to my services or from main dashboard click on manage icon with your purchased service this module service

3. Under Downloads tab you can find the files. Download specific PHP version and Ioncube version files.

How to upload the module files?t

1. After downloading's the specific PHP and Ioncube version zip file, extract it on your computer.

2. Connect FTP/SFTP, login as cPanel/Plesk, etc.

3. Under Modules folder, you will find two folders i.e. crons, addons and servers.

4. Under Modules folder, you will find the crons folder and inside this crons folder, cf_add_domain_cron.php file can be found. You need to upload that file to WHMCS crons directory (whmcs_root/crons/). If you have customized your crons folder to non-public directory then need to upload this files on that crons directory.

5. Under Modules folder, you will find the addons folder and inside this addons folder, wgs_cloudflare module folder can be found. You need to upload that module folder to WHMCS addons directory (whmcs_root/modules/addons/).

Screenshot 3 (1).png

6. Under Modules folder, you will find the servers folder and inside this servers folder, wgs_cf_partnerapi module folder can be found. You need to upload that module folder to WHMCS server’s directory (whmcs_root/modules/servers/).

Screenshot 2 (1).png

How to activate the module ?

1. Login as your WHMCS admin.

2. At top right side hover on "Wrench icon" and then go to System Settings >> find "Addon Modules" and click on Add Modules box

MicrosoftTeams-image (102).png

3. After that you can see the list of all available addon modules. Find “WGS Cloudflare Reseller Module” module.

4. Click on Activate button to activate the “WGS Cloudflare Reseller Module" Module.

5. After activation to configure it click on Configure Button

Screenshot - 2023-04-26T161148.988.png

6. Give access right to the admin role groups and then click on Save Changes.

Now you are ready to use the module.

How to allow your customers to upgrade CF (Cloud Flare) plan in Client Area?

1. You need to create a new product for this. Configure this upgrade product as same as the existing configured CF product.

2. Edit existing created Cloudflare products and then go to the "Upgrades" tab. Select specific products from "Packages Upgrades" and then save the setting.


How to upgrade the domains limit using configurable options?

With our WGS CF Reseller module, you can offer your clients to buy more domains with products using product configurable options.

When you will configure the CF module with any product then the module will auto-create the configurable group and configurable option with WHMCS. During the order, your customers can select the limit of domains and you can charge them for extra domains. If you want to give an option to your customers to buy additional domains with existing products services using the "Upgrading/Downgrading of configurable options" feature. Follow the given steps to enable this option.

1. Edit existing created Cloudflare products and then go to the "Upgrades" tab. Enable this option "Configurable Options" and then save the setting.


How to sell product addon instead of product?

When you will configure the module with any product then the module will create the required product add-ons with WHMCS.

1. At the top right side hover on the "Wrench icon" and then go to System Settings >> find "Product Addon" and click on "Product Addon" box

Screenshot 5.png

2. Then assign the hosting products with these product addons.


2. Enable "Show on Order" option with this specific product addon.

CFR Product Addon2.png

3. Assign the specific hosting products (which products you want to add this addon) and save the changes.

CFR Product Addon3.png

Cloudflare Module Setting


  • After installation/configuration the addon module. Go to the "Addons" tab and click on Cloudflare Reseller Module addon module.
Cloudfalre rr.png
  • Click on the Settings tab under the addon module menu bar.
  • Click on Submit button.
WHMCS-WGS-Cloudflare-Reseller-Module (2).png

Product Settings

On this page, the module will only display those products which have assigned our "WGS Cloudflare Reseller" module. Here you can configure/setup your products as per your requirements.

User Account Type: From this dropdown, you can choose the type of new CF user "Enterprise/Standard".

Create Member: Enable this option to create a membership with your CF account. If you have enabled it then the module will create the membership (as administrator role) with your account and Members will be invited to join your account.

Administrator - Can access the full account, except for membership management and billing.

Plan:Assign the specific CF plan with WHMCS product.

Zone Type: Select zone type as (Full zone setup "DNS" or Partial zone setup "CNAME") for new CF domain/zone.

DNS IP: Enter your hosting server IP for adding A and @ DNS records when domain will be adding on your CF. If you do not want to add it then leave it blank.

No. Of Domains: Enter limit of domains, how many numbers of domains you want to offers to your users with the appreciable product.

Proxy: Enable this option to enable HTTP Proxy by default with new adding DNS records with the zone.

Status: Disable this option to stop provisioning with the appreciable product.

Features: Here you can see the total numbers of enabled features.

Click on the "Save" icon to save the setting for specific product/Row.

Screenshot 6.png

Manage Product Features

Click on the edit icon under action from the product list under "Product Settings" to manage the features. On this page, you can enable/disable the client area features or tabs for an appreciable product.

Product addon.png

Add DNS Bundles/Records

  • Admin can manage the DNS Bundles/template (Add/Update/Delete).
WHMCS DNS Bundle (2).png

Assign DNS Bundle to Cloudflare Domains

  • Admin can assign the DNS Bundles for existing CF domains.
  • Admin can purge the cache for the domains from the addon.
  • Admin can Add/Edit the DNS Records.
  • Admin can On/Off the development mode.
WHMCS-WGS product (3).png
Domain Bundle.png

Zone List

  • Admin can see and search a list of domains through the zone list.
WHMCS-WGS-Cloudflare-Reseller-Module (477).png

Assign Cloudflare Domains

  • Admin can assign new WHMCS service for existing CF domains.
WHMCS-WGS-Cloudflare-Reseller-Module (500).png

How to configure/setup the cron for auto domain add on CF (in case of domain not register)?

Some times, if the domain is not registered or taking some time to register globally then CF will return the error like "Domain not registered yet". That time module will store this domain in DB. We are providing a file which you have to configure with your server on a time interval of 5 minutes.

This file will add the domain on CF when the domain is registered.

Cron Command: -q /home/yourfolder/public_html/crons/cf_add_domain_cron.php

Note. You can find your exactly crons folder path from your WHMCS automation settings. To find this setting, login as WHMCS admin, then go to "Setup" >>> "Automation Settings".

How to sell only DNS service?

With our module, you can sell only DNS service using CF. Follow the given below steps.

  • Create a new product with WHMCS and assign the "WGS Cloudflare Reseller" module with it.
  • Go to "Cloudflare Reseller" addon module >> Product Settings.
  • Configure this created new product and Save the settings on click on Save icon button.
  • After saving the settings click on the Edit icon button and then enable only Overview and DNS options with this appreciable product.