WHMCS Integraion
Usage and Billing solution is capable of integrating with WHMCS to process the invoices of tenants and integrate with popular payment gateways to make payments. Features supported:
  • Automated user and subscription creation in Azure Pack, when a new user orders a product in WHMCS
  • Automated email notification to user with login information for Windows Azure Pack portal
  • Automated Subscription life cycle sync with Windows Azure Pack and WHMCS
  • WHMCS Invoice generation based on tenant user usage in Windows Azure Pack

Configuring WHMCS Settings


  1. 1.
    Download WHMCS (v6 or later) and install it in a machine with optimal configuration.

Usage & Billing PHP Module

  1. 1.
    Go to the machine where Usage & Billing API Service is setup.
  2. 2.
    Copy the C:\inetpub\MgmtSvc-CloudAssertBilling\WHMCSModule\causageandbilling folder to the \modules\servers folder under WHMCS website folder in WHMCS machine (e.g., C:\inetpub\wwwroot\whmcs\modules\servers).

Adding U&B API Server

  • Login to WHMCS admin portal in the web browser
  • Click SetupProducts/ServicesServers.
  • Click Add New Server Button.
  • Specify the name, Hostname or the IP Address of the machine where the Usage and Billing API Service setup is installed.
  • Under ‘Server Details’ section specify select the type as ‘Causageandbilling’, give the username and password which was given during the installation of Usage and Billing API setup. (Refer Install Usage and Billing API Service).
  • Click ‘Save Changes’ button.

Adding A Server Group

  • Once the server is created and save successfully click ‘Create New Group’ button from Server home screen.
  • Specify the group name and select the server(s) that needs to be added to the group from the list of available servers.
  • Click ‘Save Changes’ button.

Configuring General Settings

  • Select SetupGeneral Settings tab from the home screen.
  • Specify the necessary fields under all the sub-tabs.
  • For end of month (post-usage) invoicing, disable automatic invoice on order creation by choosing ‘Just show the order completed page’ option under Ordering tab Auto Redirect on Checkout.
  • Under Security tab API IP Access Restriction field, click ‘Add IP’ button and specify the IP address of the U&B API server that was created earlier.
  • Click ‘Save Changes’ button.

Configuring Products / Services Settings

  • Click SetupProducts/Services and click ‘Create a New Group’ to create a new Product Group (e.g., Pay-as-you-go Plans)
  • Click SetupProducts/Services and click ‘Create a New Product’
  • Specify the necessary details under ‘Details’ tab and save them.
  • Under ‘Pricing’ tab specify Payment Type as ‘Recurring’ and configure One Time/Monthly Price (for advertising the product) and save the settings.
  • Under ‘Module Settings’ tab select the Module Name as ‘Causageandbilling’ and click ‘Save Changes’.
  • Once it gets saved select the Server Group created earlier.
  • Check ‘CA Billing Service - Is use Host Name’ if the server created uses host name to connect, if it uses IP Address to connect, the check box can be left blank.
  • Check ‘Automatically setup the product as soon as an order is placed’ radio button.
  • Click ‘Custom Fields’ tab.
  • Specify the Field Name as ‘SubscriptionID’ and Field Type as ‘Text box’, click ‘Save Changes’
  • Add another custom field. Specify the Field Name as ‘Windows Azure Pack Plan’, Field type as ‘Drop Down’ and specify an appropriate Windows Azure Pack Plan name in the Select Options field.
  • For the SubscriptionID and Windows Azure Pack Plan custom fields, enable the appropriate checkboxes as shown in the above screenshot.
  • Click ‘Save Changes’.

Updating Auth Key

  • Logon to the machine where WHMCS is installed.
  • Open ‘configuration.php ’ from WHMCS website folder (e.g., ‘C:\inetpub\wwwroot\whmcs’).
  • Make a note of the password that is specified.
  • Save the Document.
  • Restart WHMCS web server.

Configuring WHMCS In Usage and Billing Settings

Logon to WAP Admin Portal, Click Usage and Billing from the left pane.
  • Click Settings WHMCS tab.
  • Check the following check boxes:
      • This enables publishing of invoices to WHMCS
  • SYNCFROMENABLED? Check box field is obsolete. Leave it as it is.
  • Specify the URL field as https://WHMCSInstalledMachine/includes/api.php.
  • Specify the WHMCS administrator username and password.
  • Change the Next Due Day On Product Activation (default is 20th). This denotes the invoice due date.
  • Enter the Auth Key specified in the ‘configuration.php’ file in the WHMCS installed machine (Refer Updating Auth Key).
  • Specify the Tenant Logon URL as https://WHMCSInstalledMachine/dologin.php.
  • Leave PRODUCTIDCSV field as empty (this field is obsolete).
  • Click ‘SAVE’ button.
  • Ensure WAP Admin API Settings are configured (refer Step 2.3 – Configuring WAP Admin API Endpoint Settings).

Signing up A new tenant user

  • Tenants can sign up as new users and place orders from WHMCS portal. If Tenant needs to be onboarded by an admin to WHMCS, then follow the instructions below.
  • Click Clients Add New Clients. Specify the fields and click ‘Save Changes’ button.
  • Click Product / Services tab.
  • Select the Product/Service field and the server from the respective list boxes.
  • Specify the next Due Date, Billing Cycle and Payment method.
  • Specify the SubscriptionID of the tenant.
  • Select the Windows Azure Pack Plan and click ‘Save Changes’ button.
Note: The WHMCS gateway integration is a licensed feature and will not be available in the trial versions of the Usage and Billing solution