WHMCS automates suspension and termination based on billing events — unpaid invoices trigger suspension, cancellation requests trigger termination. The Opterius module handles all three lifecycle transitions: suspend, unsuspend, and terminate.
Suspension
Trigger: WHMCS runs its daily cron and finds an overdue invoice beyond the configured grace period.
What happens:
- WHMCS calls the Opterius module's
SuspendAccountfunction. - The Panel API suspends the account.
- The Agent applies the suspension on the server:
- nginx vhost returns HTTP 503 (or your custom suspension page — see Display & Branding).
- Mail delivery is frozen — new mail to this account is queued or rejected.
- SSH and SFTP access for the account user is disabled.
- WHMCS marks the service as
Suspended.
The account's data is preserved. Nothing is deleted during suspension.
Unsuspension
Trigger: Client pays the overdue invoice (or admin manually unsuspends from WHMCS).
What happens:
- WHMCS calls
UnsuspendAccount. - The Panel API lifts the suspension.
- The Agent restores the account on the server:
- nginx vhost returns to normal operation.
- Mail delivery resumes.
- SSH/SFTP access restored.
- WHMCS marks the service as
Active.
Termination
Trigger: Client cancels and the cancellation is processed, or admin runs a manual termination.
What happens:
- WHMCS calls
TerminateAccount. - The Panel API deletes the account.
- The Agent removes all account data from the server:
- Linux user and home directory deleted.
- nginx vhost removed.
- PHP-FPM pool removed.
- DNS zone deleted from PowerDNS.
- All databases and database users for the account deleted.
- All email accounts for the domain deleted.
- WHMCS marks the service as
Terminated.
Warning: Termination is permanent and irreversible. All data is destroyed. Ensure your backup retention policy covers the period before termination if clients may request data recovery. See Backups.
Testing Module Commands Manually
You can trigger any module command from the WHMCS admin area without waiting for an automated billing event:
- In WHMCS admin: Clients → [client] → Products/Services → [service].
- Scroll to the Module Commands section.
- Click Suspend, Unsuspend, or Terminate as needed.
Use this to test your integration after initial setup, or to manually handle edge cases.
Note: The Terminate button in WHMCS admin does not ask for confirmation in older WHMCS versions. Be deliberate before clicking it — the action is immediate and irreversible at the server level.
Suspension vs Termination in the Panel
You can also suspend and unsuspend accounts directly from the Panel (Server Mode → Accounts → [account] → Suspend) without going through WHMCS. This is useful for immediate action — for example, suspending an account suspected of abuse before the billing cycle has ended.
If you suspend in the Panel and then WHMCS runs its unsuspend cron (because the client pays), WHMCS will unsuspend the account. To prevent this, use WHMCS's own suspension flow or mark the service as suspended in WHMCS as well.