Skip to main content

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:

  1. Navigate to Admin → Clients and open the customer profile.
  2. Select the Rate Cards / Packages tab.
  3. Assign the rate card containing your active Web Hosting plans, or apply a custom customer rate card.
  4. Currency Check: Verify that the customer's account currency matches the currency configured in the Web Hosting rate card.
  5. Billing Mode: Ensure the customer is configured with a valid payment mode (Prepaid or Postpaid with sufficient credit headroom) rather than "Pool-only" allocation.
Admin Hosting Inventory

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:

  1. Normal Self-Registration: Standard gradual onboarding where the user registers directly in CMP and completes individual verification checkpoints.
  2. 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 ItemNormal CMP RegistrationWHMCS API Registration
Initiated ByEnd customer via signup pageExternal WHMCS billing platform via API
Email VerificationRequires email OTP verificationAutomatically marked verified (No OTP required)
Mobile VerificationRequires SMS OTP (when enforced)Automatically marked verified (No OTP required)
Billing AddressCompleted manually during onboardingPopulated automatically from WHMCS profile
Personal AddressCompleted manually by customerPopulated automatically from WHMCS profile
Initial Account StatusPendingActive
Final Account StateProgresses through onboarding stepsOnboarding Complete
Payment ModeConfigured based on tenant defaultsAssigned as Prepaid
Default ProjectCreated automaticallyCreated automatically
Rate CardDefault global customer rate cardAssigned via API payload or default
KYC CheckMay be required prior to activationSkipped / not part of activation path
Terms of ServiceExplicit click-through modalHandled automatically per tenant settings
System LinkNonewhmcs_client_id reference stored in profile

3. The WHMCS Registration Experience​

When a customer registers or purchases through WHMCS:

  1. Profile Transfer: WHMCS transfers customer demographic information (name, company, email, phone, country, currency, address) to CMP.
  2. Auto-Verification: CMP marks both email and phone as verified. The customer does not need to complete OTP challenges.
  3. Account Activation: The account is created with status: Active and state: Onboarding Complete under the Prepaid billing model.
  4. 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​

HeaderValueDescription
Content-Typeapplication/jsonRequest payload format
Acceptapplication/jsonExpected response format
AuthorizationBearer {{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​

FieldTypeRequiredDescription
whmcs_client_idstring / integerYesUnique customer identifier in WHMCS. Stored in CMP for synchronization.
whmcs_user_idstring / integerYesSpecific WHMCS user account ID.
firstnamestringYesCustomer first name.
lastnamestringYesCustomer last name.
currency_codestringYes3-letter ISO currency code (e.g., USD, EUR, DZD). Must match an active CMP currency.
countrystringYes2-letter ISO country code (e.g., DZ, US, FR).
statusstringYesCustomer status in WHMCS (Active, Suspended).
rate_card_slugstringOptionalSlug 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:

Was this page helpful?
Found something that could be improved?