How to Connect WHMCS to Your WHM Account
Connecting WHMCS to WHM is what turns a reseller account into a hosting business that runs without you. A customer orders, pays, and their cPanel account is created and emailed to them — no manual step, no delay, no you at 2am.
This assumes WHMCS is already installed and licensed, and that you have a working WHM reseller account with your nameservers configured.
Step 1 — Create an API token in WHM
Do not use your WHM password. Tokens can be scoped and revoked; a password cannot.
In WHM, go to Development → Manage API Tokens → Generate Token. Name it whmcs, and grant only what provisioning needs:
- Account creation and termination
- Account modification and suspension
- Package listing
- DNS zone management
Copy the token immediately. WHM shows it once and never again.
Step 2 — Add the server in WHMCS
In WHMCS: System Settings → Servers → Add New Server.
- Name — anything you recognise
- Hostname — your server hostname from the welcome email
- IP Address — your reseller IP
- Nameservers — *your* private nameservers, not ours
- Module — cPanel
- Username — your WHM reseller username
- Access Hash / API Token — paste the token here, leave Password empty
- Secure — tick, so the connection uses SSL on port 2087
Click Test Connection before saving. If it fails, it is nearly always a wrong username, a token pasted with trailing whitespace, or the Secure box left unticked.
Add the server to a server group even if you only have one. Products point at groups, and adding the group now saves reconfiguring every product later.
Step 3 — Create products that map to packages
Every WHMCS product should correspond to a WHM package you already built.
System Settings → Products/Services → Create a New Product:
- Type — Shared Hosting
- Module Settings → Module — cPanel
- Server Group — the group from step 2
- WHM Package Name — must match the WHM package name exactly, including case. This is the single most common cause of provisioning failures.
- Automatically setup the product — choose *when first payment is received*
That last setting matters. "When order is placed" provisions before payment clears, which is how you end up hosting people who never pay.
Step 4 — Test properly before going live
Do not skip this and do not test with a real customer.
1. Place a test order through your own cart. 2. Mark the invoice paid manually. 3. Confirm the account appears in WHM with the right package and quotas. 4. Confirm the welcome email arrives with your branding and your nameservers. 5. Log in to the new cPanel with the credentials it sent. 6. Terminate the test account from WHMCS — not from WHM — and confirm it disappears from both.
That last step verifies the link works in both directions. Terminating from WHM leaves an orphaned WHMCS record, which is how billing drifts out of sync with reality.
Step 5 — Turn on the automation
Set up the WHMCS cron job if the installer did not. It drives invoice generation, overdue reminders, suspensions and terminations. Without it nothing recurring happens and you will be invoicing by hand without realising why.
Then configure your suspension and termination schedule — how many days overdue before suspend, and before terminate. Be less aggressive than the defaults; suspending a paying customer over a slow bank transfer costs more than the invoice.
When provisioning fails
- "Package does not exist" — the WHM Package Name in the product does not match WHM exactly. Check case and spacing.
- Connection test fails — wrong username, token whitespace, or Secure unticked.
- Account created, welcome email not sent — WHMCS mail settings, not a WHM problem. Test with the WHMCS mail debug log.
- Account created with the wrong nameservers — the server entry in WHMCS still holds default nameservers rather than yours.
- Everything works manually but not automatically — the cron job is not running.
A note on limits
Your WHMCS licence tier caps how many clients you can hold. Check it before a growth push, so the constraint does not surprise you mid-campaign.
Some reseller tiers include a WHMCS licence — check what your plan covers before buying one separately. If provisioning is failing and the checklist above has not found it, send us the WHMCS module log on WhatsApp and we will read it with you.
Related articles
WHM vs Master vs Alpha Reseller Hosting
The three reseller tiers explained plainly — what each one lets you create, who each is actually for, and how to pick without overbuying.
How to Price Your Hosting Plans in Pakistan
Work out what to charge for reseller hosting in Pakistan — cost per account, realistic margins, plan structure, and the pricing mistakes that kill new hosts.
How to Set Up Private Nameservers
Create ns1 and ns2 on your own domain so clients never see your upstream host — registrar glue records, WHM setup, and how to verify it worked.
Was this article helpful?
Still stuck?
Our support team is available 24/7.