Client Registration & WHMCS Flow
Before customers can purchase Web Hosting plans or provision cPanel accounts, they must be registered in StackConsole CMP and assigned an active rate card containing Web Hosting packages.
This guide details both Standard Self-Registration and WHMCS Trusted Registration, comparing their verification workflows and providing the formal API specification for integrating external billing platforms like WHMCS.
1. Assigning Web Hosting Plans to Customers
CMP Admin Path: Admin → Clients → [Select Account] → Rate Cards
To make Web Hosting plans available to a specific client:
- Navigate to Admin → Clients and open the customer profile.
- Select the Rate Cards / Packages tab.
- Assign the rate card containing your active Web Hosting plans, or apply a custom customer rate card.
- Currency Check: Verify that the customer's account currency matches the currency configured in the Web Hosting rate card.
- Billing Mode: Ensure the customer is configured with a valid payment mode (Prepaid or Postpaid with sufficient credit headroom) rather than "Pool-only" allocation.
Administrators can inspect all active Web Hosting services across all clients by navigating to the read-only reporting path:
/admin/clients/overview/web-hosting
2. Registration Workflow Comparison
StackConsole CMP supports two distinct customer onboarding flows:
- Normal Self-Registration: Standard gradual onboarding where the user registers directly in CMP and completes individual verification checkpoints.
- WHMCS Trusted Registration: Provider-driven registration initiated by an external billing platform (WHMCS) via API. Because the customer identity is already validated in WHMCS, CMP completes onboarding and verification steps automatically.
Comparison Table
| Registration Item | Normal CMP Registration | WHMCS API Registration |
|---|---|---|
| Initiated By | End customer via signup page | External WHMCS billing platform via API |
| Email Verification | Requires email OTP verification | Automatically marked verified (No OTP required) |
| Mobile Verification | Requires SMS OTP (when enforced) | Automatically marked verified (No OTP required) |
| Billing Address | Completed manually during onboarding | Populated automatically from WHMCS profile |
| Personal Address | Completed manually by customer | Populated automatically from WHMCS profile |
| Initial Account Status | Pending | Active |
| Final Account State | Progresses through onboarding steps | Onboarding Complete |
| Payment Mode | Configured based on tenant defaults | Assigned as Prepaid |
| Default Project | Created automatically | Created automatically |
| Rate Card | Default global customer rate card | Assigned via API payload or default |
| KYC Check | May be required prior to activation | Skipped / not part of activation path |
| Terms of Service | Explicit click-through modal | Handled automatically per tenant settings |
| System Link | None | whmcs_client_id reference stored in profile |
3. The WHMCS Registration Experience
When a customer registers or purchases through WHMCS:
- Profile Transfer: WHMCS transfers customer demographic information (name, company, email, phone, country, currency, address) to CMP.
- Auto-Verification: CMP marks both email and phone as verified. The customer does not need to complete OTP challenges.
- Account Activation: The account is created with
status: Activeandstate: Onboarding Completeunder the Prepaid billing model. - Immediate Access: The customer can immediately log in to the portal and order Web Hosting at
/app/web-hosting/create.
4. WHMCS Registration API Reference
External billing systems use the following REST API endpoint to register and synchronize customer accounts with StackConsole CMP.
Endpoint
POST {{base_url}}/api/whmcs/users
Headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Request payload format |
Accept | application/json | Expected response format |
Authorization | Bearer {{billing_provider_settings.api_secret}} | Secret token configured in CMP for WHMCS integration |
Request Payload Example
{
"whmcs_client_id": "1184",
"whmcs_user_id": "5678",
"firstname": "John",
"lastname": "Doe",
"currency_code": "DZD",
"country": "DZ",
"status": "Active",
"rate_card_slug": "premium-customer"
}
Payload Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
whmcs_client_id | string / integer | Yes | Unique customer identifier in WHMCS. Stored in CMP for synchronization. |
whmcs_user_id | string / integer | Yes | Specific WHMCS user account ID. |
firstname | string | Yes | Customer first name. |
lastname | string | Yes | Customer last name. |
currency_code | string | Yes | 3-letter ISO currency code (e.g., USD, EUR, DZD). Must match an active CMP currency. |
country | string | Yes | 2-letter ISO country code (e.g., DZ, US, FR). |
status | string | Yes | Customer status in WHMCS (Active, Suspended). |
rate_card_slug | string | Optional | Slug identifier of the CMP rate card to assign. If omitted, CMP assigns the default rate card. |
Expected Success Response
{
"success": true,
"message": "User registered successfully from WHMCS",
"data": {
"user_id": "9a3e2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"whmcs_client_id": "1184",
"email": "john.doe@example.com",
"status": "Active",
"account_state": "Onboarding Complete",
"payment_mode": "Prepaid",
"rate_card": "premium-customer"
}
}
5. Security & Verification Notes
- API Secret Protection: The Bearer token (
api_secret) grants administrative customer-creation privileges. Store it securely within WHMCS server configuration files and rotate it periodically. - Idempotency: If a registration request is received with an existing
whmcs_client_id, CMP updates the existing customer record rather than creating a duplicate profile. - Audit Trail: Every customer created via WHMCS generates an audit log entry in CMP with source
PROVIDER.WHMCS.REGISTER.
Next Steps
Now that clients are onboarded and assigned rate cards, review: