WHMCS module for Jabali Panel
Last updated
The Jabali Panel server module for WHMCS creates, suspends, upgrades and terminates hosting accounts on Jabali Panel. It also syncs disk and bandwidth usage and adds a Log in to Jabali Panel button for customers and staff. It signs every request with an automation token, so WHMCS never stores a panel admin password. Billing integrations covers how the API, scopes and ports work.
Requirements
- WHMCS 8.x
- PHP 7.4 or newer with the
curlandjsonextensions - The WHMCS server can reach the panel on
8443, or on443with the port 443 option turned on - An automation token with
read:status,read:users,read:packages,write:usersandwrite:domains, plusdelete:usersfor termination. See Create an automation token.
1. Install the module
Copy the whmcs folder from the repository into WHMCS as modules/servers/jabali/:
git clone https://github.com/shukiv/jabali-billing-modules.git
cp -a jabali-billing-modules/whmcs /var/www/whmcs/modules/servers/jabali
Replace /var/www/whmcs with your WHMCS directory. The folder must be named exactly jabali. Copy all of it, including lib/, which holds the API client, and make sure the web server user can read the files.
2. Add the server
In WHMCS, go to System Settings → Servers → Add New Server and fill in:
| Field | Value |
|---|---|
| Module | Jabali Panel |
| Hostname | The panel hostname, e.g. panel.example.com |
| Port | 8443 (the default), or 443 if the panel admin turned on Also serve the API on port 443 |
| Username | The automation token’s ID |
| Password | The automation token’s secret |
Click Test Connection. A working connection lists the actions the panel offers.
3. Create a product
Create a product under System Settings → Products/Services and open its Module Settings tab:
- Set Module Name to Jabali Panel.
- Pick the hosting package in the Package dropdown. The dropdown needs the
read:packagesscope. - Or paste a package ID into Package ID (override). It takes precedence over the dropdown.
Recommended: the jabali_user_id custom field
On the product’s Custom Fields tab, add a text field named jabali_user_id and tick Admin Only. When the module creates an account, it saves the panel user ID there and uses it for every later action. Without the field, the module looks the account up by the service username, then by the client’s email, and fails if neither matches. You can also type an ID into this field to link a service to an account that already exists on the panel.
What the module does
| WHMCS action | What happens on the panel |
|---|---|
| Create | Creates the account on the product’s package and creates the order’s domain |
| Suspend / Unsuspend | Suspends or reactivates the account |
| Terminate | Deletes the account and its domains (needs delete:users) |
| Change Password | Sets the customer’s panel password |
| Upgrade / Downgrade | Moves the account to the new product’s package |
| Log in to Jabali Panel | Opens the panel with a single-use login link, from the client area or the admin service page |
| Test Connection | Checks the token and lists the panel’s actions |
| Usage update | Fills in disk and bandwidth usage and limits on each service |
Usernames. The module uses the service username from WHMCS. If it is empty, it uses the first 8 letters and digits of the domain.
Passwords. Jabali Panel needs passwords of at least 10 characters. If WHMCS generates a shorter one, the module stops before calling the panel and asks you to raise the generated password length in the WHMCS security settings.
Usage sync. WHMCS runs the usage update from its daily cron. The module reads usage for every account on the panel in one call and updates each WHMCS service on that server with a matching username.
Admin service page. Shows the panel user ID, the account’s email and package ID, and disk and bandwidth used against quota.
Client area. The product overview shows the panel username and an Open Jabali Panel button.
Logs and troubleshooting
Every call the module makes is in Utilities → Logs → Module Log, with secrets removed.
| Symptom | Fix |
|---|---|
| ”Jabali requires passwords of at least 10 characters” | Raise the generated password length in the WHMCS security settings. |
| ”Cannot map this service to a Jabali user” | No saved user ID and no panel account with that username or email. Put the panel user ID into the jabali_user_id custom field. |
Create fails with scope_denied | The token lacks write:domains or write:users. See scopes. |
| Package dropdown is empty | The token lacks read:packages. Add it, or use Package ID (override). |
| Clock skew error | WHMCS and the panel clocks differ by more than 5 minutes. Sync both with NTP. |
| TLS error | The panel must present a trusted certificate. The module has no option to ignore certificate errors. |
More causes are in Billing integrations: Troubleshooting.