Subscribe to receive notifications of new posts:

Integrating our Integrations: Getting WHMCS and cPanel Talking

2015-03-23

2 min read
WHMCS + cPanel

CloudFlare provides integrations for several of the most popular hosting control panels and billing systems such as WHMCS, cPanel, and Plesk. Each of these integrations provide a simple interface for our partners’ customers to sign-up for CloudFlare and start adding domains almost immediately.

But what about partners that use more than one system? The best experience occurs when we can get our integrations talking to each other, as our recently updated WHMCS and cPanel plugins do.

Integration Basics

All of our hosting integrations speak directly to CloudFlare through our host API. With just a single click, the integration passes the necessary information for CloudFlare to create an account and provision the domain. We respond when the provisioning completes, and the integration finishes the setup by making the necessary changes locally (adding and adjusting several DNS records) to route traffic to the domain through CloudFlare.

This makes signing up through a hosting partner integration even easier than signing up directly with CloudFlare. These proven systems make DNS changes accurately in order to save a lot of headaches.

Where do I integrate CloudFlare?

Many hosting companies expose two different applications to their customers: a billing system and a hosting control panel. The former allows customers to manage their billing information and the products they have purchased; the latter is used to configure hosting products such as accessing files, managing DNS, adding email addresses, and setting up a database.

Hosting partners that use both WHMCS (billing) and cPanel (hosting), commonly ask, “Which integration should I use?” In the past, we have recommended the cPanel integration, because cPanel manages the DNS records for a domain. Domains added through cPanel can be set up in one click, whereas WHMCS required presenting instructions to the end-user on finishing the configuration.

Time to Get WHMCS and cPanel Talking!

WHMCS, as a billing system, handles auto-provisioning for a variety of hosting control panels, including cPanel. When configured, WHMCS will automatically set up new accounts in cPanel once the order is complete.

We join in this auto-provisioning, and immediately after CloudFlare is added, we send requests from WHMCS to the cPanel account to set up a CloudFlare account as well. The exact setup breaks down to a few easy steps:

  1. Send a request from WHMCS to cPanel logging in as the cPanel user. This returns an access token for the user that we can use in subsequent requests to act as the user.

  2. Send a second request with the access token simulating the action that a user would have performed if signing up through cPanel.

This action has the added benefit of not only setting the domain to run on CloudFlare, but it also sets up our cPanel plugin to show the domain as orange clouded and provides the options to manage many CloudFlare settings through cPanel.

Analogous to how CloudFlare stands between web servers and web visitors, we’re using cPanel between WHMCS and our API to make it easy for our partners’ customers to add CloudFlare to any new cPanel hosting account at the point of purchase!

(Note: only CNAME or partial setup added in WHMCS currently provisions through cPanel.)

Getting Started

The latest version of our WHMCS integration can be downloaded here. Installation requires a partner API key. New partners can apply at https://www.cloudflare.com/certified-partners.

For technical questions related to our integrations, please email us at partnersupport@cloudflare.com.

Cloudflare's connectivity cloud protects entire corporate networks, helps customers build Internet-scale applications efficiently, accelerates any website or Internet application, wards off DDoS attacks, keeps hackers at bay, and can help you on your journey to Zero Trust.

Visit 1.1.1.1 from any device to get started with our free app that makes your Internet faster and safer.

To learn more about our mission to help build a better Internet, start here. If you're looking for a new career direction, check out our open positions.
PleskAPIPartners

Follow on X

David Fritsch|@dpfritsch
Cloudflare|@cloudflare

Related posts

October 15, 2024 1:00 PM

Protect against identity-based attacks by sharing Cloudflare user risk scores with Okta

Uphold Zero Trust principles and protect against identity-based attacks by sharing Cloudflare user risk scores with Okta. Learn how this new integration allows your organization to mitigate risk in real time, make informed access decisions, and free up security resources with automation....

September 24, 2024 1:00 PM

Automatically generating Cloudflare’s Terraform provider

The Cloudflare Terraform provider used to be manually maintained. With the help of our existing OpenAPI code generation pipeline, we’re now automatically generating the provider for better endpoint and attribute coverage, faster updates when new products are announced and a new API documentation site to top it all off. Read on to see how we pulled it all together....