Skip to content

WHMCS integration

Sell hosting through WHMCS and have the panel build the servers.

License required

The WHMCS integration needs the WHMCS Integration license feature.

BadgerPanel calls the WHMCS API to keep products, orders, invoices, clients, and support tickets in step.

WARNING

BadgerPanel does not ship a WHMCS module. The panel is the side that makes the calls. You give the panel your WHMCS API credentials, and the panel reads and writes through the WHMCS API.

Where the settings live

WHMCS appears in three places in the panel. They save to different places, so choose one and stay with it.

LocationHow to reach itWhat it covers
Webhooks & IntegrationsAdmin > Settings > General > Webhooks, then the Integrations tabConnection details and support ticket sync.
WHMCS IntegrationType whmcs in the admin search boxConnection details, entity sync, sync status, and sync history.
Billing gatewaysAdmin > Billing > SettingsA third connection form with a sync direction.

TIP

Use Webhooks & Integrations for ticket sync. Use the WHMCS Integration page for product, order, invoice, and client sync. The WHMCS Integration page has no navigation entry. Find it with the admin search box.

Connection settings

On the WHMCS Integration page:

FieldDescription
EnabledTurns the integration on.
API URLThe full API address, for example https://billing.example.com/includes/api.php.
API IdentifierYour WHMCS API credential identifier. Create it in WHMCS under Setup > Staff Management > API Credentials.
API SecretThe secret for that identifier. Leave it blank to keep the stored value. A Show button reveals what you type.

On the Integrations tab of the Webhooks page:

FieldDescription
WHMCS URLThe base address, for example https://billing.example.com. Do not add the API path here.
API IdentifierThe same identifier.
API SecretThe same secret.
Sync Interval (minutes)How often the panel syncs. The range is 5 to 1440.

WARNING

The two forms want the address in a different form. The WHMCS Integration page wants the full path to includes/api.php. The Integrations tab wants the base address only.

Click Test Connection on either form. The panel reports a success or a failure at once.

The panel encrypts the API secret before it stores it.

Entity sync

On the WHMCS Integration page, the Sync Settings card controls what moves.

Sync Direction has three buttons:

DirectionResult
WHMCS to PanelThe panel imports from WHMCS.
Panel to WHMCSThe panel exports to WHMCS.
BidirectionalBoth directions run.

Entities to Sync has four tick boxes: Products, Orders, Invoices, and Clients.

Click Save Sync Settings.

WARNING

A sync overwrites a record on the receiving side when the two sides differ. Choose the direction before you run the first sync.

Running a sync

The Sync Status card shows the time of the last sync and a state pill: Idle, Syncing..., or Error.

Click Sync Now and confirm. The sync runs in the background.

Four tiles under the card show Products, Orders, Invoices, and Clients. Each tile shows the local count, the WHMCS count, and the number of synced records.

Sync history

The Sync History card lists each run. Each row shows the entity, the direction, the start time, the duration, and a status badge: Success, Partial, or Failed. The row also shows the number of processed records, and the number created and updated.

When a run reports errors, click the error link on the row to read them.

Ticket sync

Ticket sync is separate from entity sync. Configure it on the Integrations tab of the Webhooks page.

  1. Turn on the Ticket Sync switch.
  2. Choose the Sync Direction:
    • Bidirectional (panel to WHMCS and back)
    • Panel to WHMCS only
    • WHMCS to panel only
  3. To bring across the tickets that the panel has not seen, turn on Import Existing. The switch clears itself after the first successful import.
  4. Click Save Changes.

Click Sync Tickets Now to run a sync at once. The card shows the time of the last sync.

Ticket sync moves the ticket, the replies, and the status.

Troubleshooting

ProblemWhat to do
Connection failedRead the API URL again. The WHMCS Integration page needs the full path to includes/api.php. Make sure that the panel host can reach that address.
Authentication failedMake sure that the API identifier and the secret are correct, and that WHMCS did not revoke them.
TimeoutThe WHMCS server can be busy. Try again later.
Partial syncOpen the Sync History card and read the errors on that run.
Nothing syncsMake sure that the integration is enabled, and that the entity is ticked in Sync Settings.
Two forms disagreeThe Integrations tab and the WHMCS Integration page store their values separately. Fill in the form for the job that you want, and check the settings there.

Make sure that the WHMCS API credentials hold the permissions for every entity that you sync.

BadgerPanel Documentation