How to connect WHMCS to TNS Panel

How-to Integrations and business whmcsapi tokenbillingautomation

Create an API token, install the server module, add the server in WHMCS and provision accounts automatically.

Steps

  1. 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.
  2. Copy modules/servers/controlpanel/ from the release's integraciones/whmcs directory into WHMCS modules/servers/. It needs PHP's curl extension.
  3. In WHMCS go to Setup, Products/Services, Servers, Add New Server with type controlpanel. Hostname panel.example.com:2087 (no https://; the module always uses HTTPS). Password: the token. Leave Username and Access Hash empty.
  4. Click Test Connection; it must succeed.
  5. On the product, under Module Settings, Plan, enter the exact name of a plan that exists in the panel.
  6. 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