Appearance
WHMCS & Blesta
AIO Panel ships provisioning modules for the two most common billing systems. Once installed, your billing system creates the hosting account when an order is paid, suspends it when an invoice is overdue, changes its package on upgrades, lets the customer log in with one click and shows disk and bandwidth usage.
Business plan
The billing API is part of the Business plan. On the Free and Pro plans the endpoints answer with 402 and the modules report "This feature needs the Business plan".
Download
Both modules can be downloaded without a panel from aiopanel.net/modules.
1. Prepare the panel
- Settings → Policies: switch Billing API on.
- Create the hosting packages you sell under Accounts → Packages (disk, bandwidth, accounts, CPU/memory limits...). The billing system refers to them by name.
- Create an API token for the billing system: avatar menu → Profile → API tokens → Create token. Scope: Full access, or Custom with billing and accounts. Restrict it to the IP address of your billing server if you can. Copy the token; it is shown once.
2. Get the module
- From any panel:
https://<panel>:8282/api/billing/modules/whmcs.zipor.../blesta.zip(with the token:curl -H "Authorization: Bearer aio_..." -o whmcs.zip https://...). - Or from the repository: the
integrations/folder.
3a. WHMCS
- Unzip into your WHMCS installation so that
modules/servers/aiopanel/aiopanel.phpexists. - System Settings → Servers → Add New Server: Module AIO Panel, hostname of the panel (for example
srv1.example.com), port8282, tick Secure, paste the token into Access Hash. Test Connection should succeed. - For every product: Module Settings → Module: AIO Panel, Package = the package name in the panel. Leave Create website on to create the ordered domain as the account's primary website with DNS zone, mail and SSL.
- Enable the usage update cron (WHMCS runs
UsageUpdatedaily) to show disk and bandwidth in the client area.
Customers get a Log in to control panel button on the service page; administrators have the same under the service's module commands.
3b. Blesta
- Unzip into your Blesta installation so that
components/modules/aiopanel/aiopanel.phpexists. - Settings → Company → Modules → Available → AIO Panel → Install, then Add server: label, panel hostname, port
8282, the token, HTTPS on. Saving tests the connection. - Create a package: module AIO Panel, pick the server (or a server group), enter the AIO Panel package name and whether to create the ordered domain as a website.
The client area gets a Control panel tab with the account's usage and a one-click login.
What the modules call
| Action | Endpoint |
|---|---|
| Create account | POST /api/billing/accounts |
| Suspend / unsuspend | POST /api/billing/accounts/:username/suspend · /unsuspend |
| Terminate | DELETE /api/billing/accounts/:username (body { "confirm": "<username>" }) |
| Change password | POST /api/billing/accounts/:username/password |
| Change package | POST /api/billing/accounts/:username/package |
| Usage | GET /api/billing/accounts/:username/usage |
| Single sign-on | POST /api/billing/accounts/:username/login → { url }, valid once for 60 seconds |
| List accounts / packages | GET /api/billing/accounts · GET /api/billing/packages |
Every call is written to the panel's Activity Log as billing.*, and the modules log requests and responses on their side (WHMCS: Module Log; Blesta: Tools → Logs → Module).
Troubleshooting
- 401 Unauthorized: the token is wrong, expired, revoked or restricted to another IP address.
- 403 The billing API is turned off: switch it on under Settings → Policies.
- 404 Package: the package name in the product does not match a package in the panel (names are case-sensitive).
- Certificate errors: the billing server must trust the panel's certificate. Issue a Let's Encrypt certificate for the panel hostname (
aio ssl:panel) instead of the self-signed one.