Skip to content

WHMCS Post-Pay Billing

What is Post-Pay Billing?

The Post-Pay Model allows customers or end users to signup and gain access to SolusVM 2 to provision virtual machines on-demand. The user is then billed after the service has been used for usage in the prior billing period.

How do users sign-up?

With the Post-Pay Model of billing, there is no purchase or order necessary.

Users can sign-up/activate their SolusVM 2 user account via the provided landing page.

The enrollment process requires minimal information from the user necessary to create a WHMCS client account, along with email verification and agreement to your Terms of Service and (optionally) Post-Pay specific Terms & Conditions. The workflow is as follows:

  1. User requests to create an account for VM provisioning
  2. User enters their name, company, email address and a desired password
  3. User is sent an email containing a link to complete the signup process
  4. Once the email link is followed, the user is prompted to agree to your Terms of Service and Post-Pay Terms & Conditions
  5. Upon acceptance of all terms, user account is provisioned to SolusVM 2
  6. User is then provided with a login button to the SolusVM 2 Control Panel Users can then access SolusVM 2 at any time via a provided SSO link within the WHMCS client area dashboard.

How do users access the SolusVM 2 system?

With the Post-Pay Model, customers use the SolusVM 2 control panel to provision and manage virtual machines.

The WHMCS client area dashboard will show one of the following 2 panels, dependant upon the users current SolusVM 2 enrollment status.

Not Enrolled in SolusVM 2 Enrolled in SolusVM 2

For enrolled users, the Log in to SolusVM 2 button can be used to access the SolusVM 2 control panel at any time via automated single sign-on. Non-enrolled users are provided a shortcut to the provided landing page to learn more and sign-up.

How does invoicing work?

Invoices are generated on the 1st of each month for all usage accrued in the immediately preceeding month.

For example, on the 1st August, invoices will be generated for the usage by all users in the month of July.

How is usage calculated?

SolusVM 2 tracks the uptime of every virtual machine and uptime is billed at the hourly rate of tokens that you define within the SolusVM 2 software.

When it becomes time to generate an invoice, WHMCS will request the uptime totals for each user from the SolusVM 2 system and then create an invoice with an itemized list of resources (aka virtual machines) and the amount due, calculated by taking the tokens usage value provided by the SolusVM 2 system, and multiplying it by the token pricing that you have defined in WHMCS.

How is billing triggered?

Invoice generation and user management is managed by a cron task.

The cron task will be executed once per day.

The cron task can be triggered manually using the following command:

php crons/cron.php do --Solusvm2Automation -vvv

Please note that automatic invoice generation will only occur on the 1st day of each month.

How to manually trigger invoice generation?

Open WHMCS configuration file configuration.php. WHMCS configuration file can be found in your WHMCS root directory, for example: /var/www/vhosts/whmcs.example.tld/httpdocs/configuration.php.

It is a good idea to back up it first like cp -p configuration.php configuration.backup.php.

Add following lines in WHMCS configuration file configuration.php.

$solus = [
    'invoicingOverride' => true,
    // To generate invoives for October 2022
    'invoicingDate' => \WHMCS\Carbon::createFromFormat('Y-m-d', '2022-11-01'),

Execute command:

php crons/cron.php do --Solusvm2Automation -vvv

It is very important to remove added lines from configuration.php.

Back to top