Billing modules
Sell ScalPanel hosting from WHMCS or Blesta with the ScalPanel provisioning modules.
ScalPanel has provisioning modules for WHMCS (8 or later) and Blesta (5 or later). With them, your billing system creates, suspends, upgrades and terminates hosting accounts on its own, and customers can open their hosting panel from the client area without a second sign-in.
Both modules share one small PHP library and talk to the ScalPanel API over HTTPS with an API token.
What the modules do
| Billing action | What happens in ScalPanel | WHMCS | Blesta |
|---|---|---|---|
| Create | Creates the account and its owner with the username and password from the billing system. With Set up domain, also the DNS zone, website and mail domain. | Yes | Yes |
| Suspend / Unsuspend | Suspends the account (websites, mail and sign-in) or reactivates it. | Yes | Yes |
| Terminate / Cancel | Terminates the account and deletes its websites, databases, mail and DNS. Backups stay until their retention ends. An account that no longer exists counts as done. | Yes | Yes |
| Change password | Sets the owner's password. The owner's other sessions and API tokens end. | Yes | Yes |
| Change package | Moves the account to another ScalPanel package. | Yes | Yes |
| Single sign-on | Opens the owner's own session in the hosting panel with a one-time link, valid for two minutes. | Log in to ScalPanel button | Log in to ScalPanel tab |
| Usage | Records disk and this month's transfer, in MB, for every active or suspended service. | Daily usage update | No |
| Test connection | Checks the server settings and the token. | Yes | Checked when you save the server |
The modules find accounts by the owner's username, which both billing systems store.
Single sign-on never skips two-factor authentication. If the owner uses it, the module tells them to sign in to the panel with their password and code instead.
Get the modules
The module files are not part of the ScalPanel server installation. Ask SCB Network at [email protected] for the current package. It contains:
| Billing system | Copy the folder to |
|---|---|
| WHMCS | <whmcs>/modules/servers/scalpanel/ |
| Blesta | <blesta>/components/modules/scalpanel/ |
Step 1: Create an API token
- Sign in to the admin panel (port 2087) as the provider or the reseller who will own the accounts.
- Open Settings → My security, and in API tokens select New token.
- Name it after the billing system and give it these scopes:
tenants.read,packages.read,sites.readaccounts.create,accounts.manage,tenants.suspendusers.managedomains.manage,sites.manage,dns.manage,mail.manage,databases.manage
- Choose a lifetime and copy the token.
Accounts the billing system creates belong to the token's owner: the provider, or that reseller.
Warning: This token can create, suspend and terminate every account of its owner. Store it only in the billing system, which keeps it encrypted, and plan to replace it before it expires. When it expires, provisioning stops until you paste a new one.
Step 2: Add the server
WHMCS
- Open System Settings → Servers and add a new server.
- Enter the panel's hostname and choose the module ScalPanel.
- Set the port to
2087and tick Secure (HTTPS). - Paste the API token into Access Hash.
- Select Test Connection, then save.
Blesta
- Open Settings → Modules, install ScalPanel, and select Add Server.
- Enter a name, the hostname, API port
2087, tick Use HTTPS, and paste the API token. - Optionally enter the Customer panel address if customers reach the hosting panel under another name (for example
https://panel.example.com:2083). The default is the hostname on port 2083. - Save. Blesta checks the token when you save.
The modules verify the panel's TLS certificate. Turn HTTPS off only for a test server.
Step 3: Create the product
WHMCS: create a product with the module ScalPanel. On Module Settings:
| Option | What it does |
|---|---|
| Package | The ScalPanel package to use. The list is loaded from ScalPanel. |
| Set up domain | On by default: creates the DNS zone, website and mail domain at once. |
| Customer panel | Optional, for example https://panel.example.com:2083. Default: the server, port 2083. |
Blesta: create a package with the module ScalPanel, choose the ScalPanel package, and leave Set up the domain at once ticked unless you want an empty account.
In Blesta, only staff choose the username. On a client's order, the module makes it from the domain, and it makes a strong password if none is given. Passwords must have at least 12 characters.
Troubleshooting
- Errors in the billing system show the API's own message, for example a package limit or a username that is taken. WHMCS also writes failed calls to its module log.
- Every call fails with an authentication error: the token is wrong, expired or revoked, its owner was suspended, or the admin panel only accepts staff from certain networks and the billing server is not in them.
- Accounts appear under the wrong reseller: they belong to the token's owner. Use a token of the right reseller.
- Single sign-on does not open the panel: the owner uses two-factor authentication, or the account is suspended. They can still sign in normally.