How to connect WHMCS to TNS Panel
Create an API token, install the server module, add the server in WHMCS and provision accounts automatically.
Steps
- In the admin interface open Panel, API tokens, create a token named "WHMCS" with an expiry (at most one year) and copy it. It is shown once and stored as a hash.
- Copy
modules/servers/controlpanel/from the release'sintegraciones/whmcsdirectory into WHMCSmodules/servers/. It needs PHP'scurlextension. - In WHMCS go to Setup, Products/Services, Servers, Add New Server with type
controlpanel. Hostnamepanel.example.com:2087(nohttps://; the module always uses HTTPS). Password: the token. Leave Username and Access Hash empty. - Click Test Connection; it must succeed.
- On the product, under Module Settings, Plan, enter the exact name of a plan that exists in the panel.
- Fill the customer's email before creating the account: the activation link goes there.
What WHMCS actions do
Create makes the client and site and emails a one-hour link so the customer chooses their password. Suspend and unsuspend set a state, so repeating them is safe. Terminate deletes. Change package assigns the plan. Change password emails a reset link.
Notes
- TLS is always verified. While the panel's certificate is self-signed, install it in the trust store of the WHMCS server.
- A token never sees or sets a password or second factor.
- The module has not yet been exercised against a production WHMCS: test it on a staging WHMCS first.
Last updated: 2026-10-10