- Docs
- API & integrations
- WHMCS module
WHMCS module
Create and terminate apps from your billing panel.
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.
A customer pays an order in WHMCS and the product's module runs Create Account.
The module calls the Cipi API (POST /api/apps), which creates an isolated app: user, database, PHP pool, vhost.
Optionally a Let's Encrypt certificate is issued once DNS points at the server.
Suspend, unsuspend, change package and terminate in WHMCS call the matching Cipi API actions.
Requirements#
WHMCS 8.x, a Cipi server with cipi api, and a token with these abilities:
| Ability | For |
|---|---|
apps-view | Test Connection, App Info |
apps-create | Create Account |
apps-edit | Change Package |
apps-suspend | Suspend, Unsuspend |
apps-delete | Terminate |
deploy-manage | Deploy, Rollback, Unlock |
ssl-manage | Install SSL, Auto-SSL |
Install#
your-whmcs/
└── modules/servers/cipi/
├── cipi.php
└── lib/CipiApiClient.php- Copy
modules/servers/cipi/into your WHMCS root. - System Settings → Servers → Add New Server: type Cipi (Laravel hosting), hostname = API base URL (no trailing slash), password = token, Secure = yes.
- Create a hosting product on that server and set its module settings:
| Setting | Values | Default |
|---|---|---|
| PHP Version | 8.3, 8.4, 8.5, 8.6 | server default |
| App Type | laravel or custom | laravel |
| Git Repository (SSH) | Required for Laravel, optional for custom | — |
| Git Branch | Branch to deploy | main |
| Auto SSL | Certificate right after creation | No |
| App type | Cipi equivalent | Good for |
|---|---|---|
laravel | cipi app create | Laravel apps with Deployer releases, workers, database |
custom | cipi app create --custom | WordPress, static sites, SPAs, any PHP; Git optional (SFTP-only hosting) |
Lifecycle#
| WHMCS action | API call | Behaviour |
|---|---|---|
| Test Connection | GET /api/apps | Token and reachability |
| Create Account | POST /api/apps | Provision, wait for the job, optional SSL |
| Suspend | POST /api/apps/{name}/suspend | 503 maintenance page, nothing deleted |
| Unsuspend | POST /api/apps/{name}/unsuspend | Normal vhost back |
| Change Package | PUT /api/apps/{name} | PHP, repository, branch |
| Terminate | DELETE /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:
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.