Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. API & integrations
  3. WHMCS module

WHMCS module

Create and terminate apps from your billing panel.

API & integrations

Sell Laravel and PHP hosting on your own servers. The official WHMCS provisioning module (github.com/cipi-sh/whmcs, MIT) maps the WHMCS lifecycle to the Cipi API: orders create apps, suspensions take them offline, terminations remove them. A self-contained drop-in, no Composer dependencies.

Step 1 of 4Order paid

A customer pays an order in WHMCS and the product's module runs Create Account.

Requirements#

WHMCS 8.x, a Cipi server with cipi api, and a token with these abilities:

AbilityFor
apps-viewTest Connection, App Info
apps-createCreate Account
apps-editChange Package
apps-suspendSuspend, Unsuspend
apps-deleteTerminate
deploy-manageDeploy, Rollback, Unlock
ssl-manageInstall SSL, Auto-SSL

Install#

your-whmcs/
└── modules/servers/cipi/
    ├── cipi.php
    └── lib/CipiApiClient.php
  1. Copy modules/servers/cipi/ into your WHMCS root.
  2. System Settings → Servers → Add New Server: type Cipi (Laravel hosting), hostname = API base URL (no trailing slash), password = token, Secure = yes.
  3. Create a hosting product on that server and set its module settings:
SettingValuesDefault
PHP Version8.3, 8.4, 8.5, 8.6server default
App Typelaravel or customlaravel
Git Repository (SSH)Required for Laravel, optional for custom—
Git BranchBranch to deploymain
Auto SSLCertificate right after creationNo
App typeCipi equivalentGood for
laravelcipi app createLaravel apps with Deployer releases, workers, database
customcipi app create --customWordPress, static sites, SPAs, any PHP; Git optional (SFTP-only hosting)

Lifecycle#

WHMCS actionAPI callBehaviour
Test ConnectionGET /api/appsToken and reachability
Create AccountPOST /api/appsProvision, wait for the job, optional SSL
SuspendPOST /api/apps/{name}/suspend503 maintenance page, nothing deleted
UnsuspendPOST /api/apps/{name}/unsuspendNormal vhost back
Change PackagePUT /api/apps/{name}PHP, repository, branch
TerminateDELETE /api/apps/{name}Remove the app

Admin buttons on the service page: Install SSL, Deploy, Rollback Deploy, Unlock Deploy, App Info. If Auto-SSL fails, the app is still created and a warning is logged. Every call is logged with logModuleCall() (Utilities → Logs → Module Log).

Extend it#

The bundled CipiApiClient covers apps, deploys, SSL, aliases, databases and jobs, for your own hooks:

php
require_once ROOTDIR . '/modules/servers/cipi/lib/CipiApiClient.php';
$client = new CipiApiClient('https://api.example.com', $token);
$client->addAlias('myapp', 'alias.example.com');
$client->createDatabase('myapp_extra');
$client->backupDatabase('myapp');

The module adds no client-area tab. One-time secrets Cipi generates (SSH and database passwords, deploy key, webhook) aren't pushed to WHMCS: deliver them with a hook or your support workflow. For richer tooling use the PHP SDK.