Disk Space and Bandwidth Overage Billing

From WHMCS Documentation

  • Overage billing allows you to bill based on the disk and/or bandwidth used for a given month over and above the base amount allowed with a package
  • Products can still have a base price or the price and soft limits can be set at zero to bill solely based on the usage
  • Usage charges are calculated on the last day of each month
  • They can be invoiced on the last day of the month independantly from the related product or added as billable items to be included on the next invoice the client gets sent
  • Native support is included for cPanel, Plesk, and DirectAdmin modules using the values returned from the respective control panel API's but this feature can also be used by developers with their own control panels passing usage data direct to the WHMCS database

How to Configure

To enable and configure overage billing for a product:

  1. Go to the Other tab at Configuration () > System Settings > Products/Services or, prior to WHMCS 8.0, Setup > Products/Services.
  2. Check Overages Billing.
  3. Enter the Soft Disk Limit and Soft Bandwidth Limit to include with the package.
  4. Enter the cost for disk space and bandwidth in your default currency for Disk Overages Cost and Bandwidth Overages Cost.
    • You can use up to four decimal places.
    • The system will multiply this by the overused amount.
  5. Choose the unit of measure for overages (Megabytes, Gigabytes or Terabytes)
    1 GB = 1024 MB, 1 TB = 1024 GB.
  6. Click Save.
  7. Go to Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings.
  8. Use the Overage Billing Charges option to choose when clients are invoiced for their overage usage.

Invoicing

Overages are calculated with a precision of one tenth of one gigabytyte. For example, an overage of 1.5 GB at $1.00 per GB will bill $1.50.

If you have selected for WHMCS to add the overage charge to the next invoice, it will be added as the final line item on the invoice. Or if the invoice independently option was selected, it will be the sole item on the invoice.

Overage invoice line items are generated with a format as follows:

Shared Hosting - whmcsdemo.com (01/05/2014 - 31/05/2014)
Total Disk Usage = 1.5 GB - Overage Charge = 0.5 GB @ 1.50/GB
Shared Hosting - whmcsdemo.com (01/05/2014 - 31/05/2014)
Total Bandwidth Usage = 7.5 GB - Overage Charge = 2.5 GB @ 2.50/GB

Custom Fields and Configurable Options

The overage billing limits for a product can be overridden by custom fields or configurable options named either Disk Space or Bandwidth. The values provided will instead be used when performing overage calculations.

For example, if the soft disk limit was set to 10MB, and a configurable option was set to 20MB, then the client would only be charged for overage once they go above 20MB.

When setting up a configurable option for the purpose of overriding overage billing limits, the option type can be any that returns a numerical value (Drop Down, Radio, or Quantity). While only numerical values can be used as options, friendly names can display non-numerical values to the customer. The unit of measurement is obtained from the Other tab of the product configuration at Configuration () > System Settings > Products/Services or, prior to WHMCS 8.0, Setup > Products/Services. For example:

150|150GB

or

999|999MB

The Configurable Option value will always use the same unit of measurement configured in the product configuration Other tab, although friendly names allow you to display a different unit of measurement if required. For example, if the product is configured with MB as the unit of measurement but it is desirable to display 10 Gigabytes to clients:

10000|10 Gigabytes

When setting up a Product Custom Field for the purpose of overriding Overage Billing Limits, the Field Type can be any which returns a numerical value; this would be the Text Box, Drop Down, and Text Area types. Additionally, it is important to note that values defined by a Configurable Option will override values set by a Product Custom Field. As with Configurable Options, the unit of measurement is obtained from the Other tab of the product configuration at Configuration () > System Settings > Products/Services or, prior to WHMCS 8.0, Setup > Products/Services.

Notes

If you only wish to charge for one of the items (ie. charge only for bandwidth overages) set the soft disk limit to a very high value, say 999999999. That way the user will never exceed it and thus never be charged for any disk overage.

If you'd like to have WHMCS automatically suspend a service when its overage costs are not paid, the Include on the Next Invoice option must be selected at Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings.

Overage billing may only be configured in your system's default currency. WHMCS will automatically convert overage prices into a client's currency using the rates listed at Configuration () > System Settings > Currencies or, prior to WHMCS 8.0, Setup > Currencies.