Personal tools
Namespaces

Variants
Actions

Advanced Billing For WHMCS

From ModulesGarden Wiki
Revision as of 14:24, 7 March 2014 by Gregor (Talk | contribs)

Jump to: navigation, search

Contents

About Advanced Billing For WHMCS

Article update is ongoing on this page, watch out for broken links and unclear descriptions! We are sorry for the inconveniences.

Advanced Billing For WHMCS is a module that allows you to set up additional billing options for your products like disk usage or number of email accounts based on the usage.

In other words, our product will let you to charge customers based on the resources used by them. What is more, it offers hourly billing, ticket billing and credit billing.
Module will also automatically generate the invoices based on the data gathered by the synchronization.

  • Features:
✔ Hourly Billing For Any WHMCS Module!
✔ cPanel & cPanel Extended Integration: Hourly, Bandwidth, Storage, Databases, Addon Domains, Subdomains, Parked Domains, Domain Forwarders, FTP Accounts, Installed Applications, Email Accounts
✔ Parallels Plesk Panel & Parallels Plesk Panel Extended Integration: Hourly, Subdomains, Disk Space, Email Boxes, Sites, Redirects, Mail Groups, Autoresponders, Mailing Lists, Users, Databases, Webapps, Traffic
✔ DirectAdmin & DirectAdmin Extended Integration: Hourly, Bandwidth, Storage, Subdomains, Domain Pointers, FTP Accounts, MySQL Databases, Virtual Domains, Mailing Lists, POP Accounts, Email Forwarders, Email Autoresponders
Parallels Cloud Server Integration: Templates, CPU Usage, Memory, Bandwidth IN, Bandwidth OUT, Disk Used, Backups Usage
✔ SolusVM & SolusVM Extended VPS Integration: Hourly, Disk Usage, Bandwidth, Memory Usage
SolusVM Extended Cloud Integration: Available Disk Size, Disk Usage, Available Bandwidth, Available Memory, Cores, IP Addresses, Disk Usage, Bandwidth Used, Memory Usage
Proxmox VPS Integration: Hourly, Disk Usage, Bandwidth IN, Bandwidth OUT, Memory Usage, Backups Usage, CPU Number, CPU Usage
Proxmox Cloud Integration: Disk Usage, Disk Size, Bandwidth IN, Bandwidth OUT, Memory Usage, Memory Size, Backups, CPU Number, CPU Usage
Rackspace Email Integration: Hourly, Mailbox Storage, Mailboxes, Sync Licenses, Blackberry Licenses, Exchange Storage, Exchange Mailboxes
Zimbra Email Integration: Hourly, Mailboxes, Aliases, Storage
✔ Ticket Billing
✔ Credit Billing
✔ Configuration Per Product
✔ Current List Of Billable Items For Next Invoices
✔ Possibility To Generate Invoices Automatically Or Manually
✔ Bill When Invoice Is Generated For Hosting
✔ Bill On Terminate Account
✔ Bill Each 1st Day Of Month
✔ Automatically Apply Credit
✔ Logs
✔ Multi-Language Support
✔ Supports WHMCS V5 and Later

Installation

In this tutorial we will show you how to successfully install and manage Advanced Billing For WHMCS.

We will guide you step by step through the whole installation and configuration process.

1. Log in to your client area and download Advanced Billing For WHMCS.
AB2 1.png
2. Upload and extract the module into the main WHMCS directory.

Files in your WHMCS directory should look like this.

AB2 2.png
3. When you install Advanced Billing for the first time you have to rename 'license_RENAME.php' file.

File is located at 'modules/addons/AdvancedBilling/license_RENAME.php' . Rename it from 'license_RENAME.php' to 'license.php' .

File:AB2 3.png
4. In order to configure your license key you have to edit a previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key at your client area → 'My Products' .

File:AB2 4.png
5. Now you have to activate the module in your WHMCS system.

Login to your WHMCS admin area. Click 'Setup' then choose 'Addon Modules' .
Afterwards find 'Advanced Billing 2.0.1' and press Activate button.

File:AB2 5.png
6. In next step you need to permit access to this module.

To do so click on 'Configure' , choose 'Full Administrator' and press 'Save Changes' .

File:AB2 6.png
7. Last step is setting up two cron jobs, you can find them in your WHMCS → 'Addons' 'Advanced Billing 2.0.1' as shown on the following screen.
File:AB2 7.png
Well done, you have just successfully installed Advanced Billing For WHMCS!

Configuration and Management

Now lets learn more about module functionalities. We will present you possibilities of our product on cPanel Extended example.

Please note that billing features are different in each module but the core functionality of the Advanced Billing is the same for each.
First choose your module from 'Enable Advanced Billing for' dropdown menu as show on the following screen.
For presentation purposes we chose 'cPanel Premium' with cPanel Extended module.

AB2 8.png

Configuration

We group configuration options in 4 tabs depending on their purpose.

You can access resource usage pricing from each of the tabs.

General Settings Tab

Here you can find information about module used by your product. If module is not supported, 'Basic Module' mode will be used.

'Basic Module' enables you to bill your client for hourly usage of product only.
In this tab you can also enable/disable Advanced Billing for product.
To disable it, simply unmark 'Enable' checkbox and press 'Save Changes' button, as shown on the following screen.

AB2 9.png

Billing Settings Tab

In this tab you can set up billing for product.

1. 'Bill on Terminate' - when account connected with your module will be terminated, invoice for account will be generated.
2. 'Bill on Invoice Generate' - customer will receive invoice at the same time as the invoice for his hosting account.
3. 'Bill Each 1st Day of Month' - will generate invoices each first day of month.
4. 'Autogenerate Invoice' - this is important feature, if enabled, it will automatically send previously generated invoices directly to your customers.
5. 'Create Invoice Each' - when you set that field to e.g. '14' , all your customers will be billed exactly each 2 weeks after account creation.
6. 'Due Date' - the number of days in which your customers will have to pay the invoice.
7. 'Auto Apply Credits' - automatically apply any available credits when invoice is created, works only if 'Autogenerate Invoice' is enabled.

File:AB2 10.png

Credit Billing Tab

Credit billing allows you to charge for product from client credit balance.

1. 'Enable Credit Pay' - this option enables/disables credit billing for this module (if credit billing is enabled, standard billing will be turned off).
2. 'Create Invoices Each' - this option defines how often invoice will be generated for this product (if nothing entered here, it will be 30 days).
3. 'Minimal Credit' - minimal amount that will be charged from client account credit balance.
4. 'Low Credit Notify' - send email to your client about low credit amount on account account if this value is higher than credits on client account.
5. 'Email Interval' - defines how often low credit notification email will be send.
6. 'Autosuspend' - when credit balance reach 0, product ordered by client is autosuspended and invoice with lacking amount is generated.
7. 'Due Date' - the number of days that your customers will have to pay the invoice.

File:AB2 11.png
When 'Autosuspend' is marked and your client credit ballance reach 0, his product will be suspended. Additionally, invoice with lacking payment will be generated.

If it is unmarked and credit balance reach 0, account will not be suspended and invoice will be generated according to number of days set in 'Create Invoices Each' field.

Module Settings Tab

This tab shows only for cPanel/cPanel Extended modules.

Here you can set Application Manager (Softaculous/Installatron) and cPanel theme. Default value of theme is 'x3' .
To use different theme you have installed simply enter its name as shown on the screen below.

AB2 12.png

Used Resource Pricing

In the bottom part of the screen you can set up billing for specific server resource usage like for e.g. bandwidth.

'Free Limit' field is used to set amount of usage records for which customer won't be charged.
In our example, customer won't be charged for 1GB (1024MB) bandwidth.
'Price' defines how much your client will have to pay for specific resource. Note that we provide two types of charging: units per hour and units used since last cron run.
For example, user pays for subdomain quantity each hour, but when he generates traffic, he will pay only once for bandwidth he used since last cron run.
'Displayed Unit' category defines how record usage will be displayed. It do not affect free limit and pricing, they are calculated in basic unit.
So, if you select 'GB' , free limit will be still 1024 MB, and price will be MB/hr, not GB/hr.
'Status' allows you to enable/disable billing for this resource.
To proceed, choose your usage records, units, status, set up the prices and free limits. Afterwards, press 'Save Changes' .

AB2 13.png
As you could notice on the screen above, 'Configure' column was added.

It allows you to set up different free limits and pricing depending from resource origin.
Currently only Parallels Cloud Server submodule supports this feature.

AB2 13 1.png

Items

To view counted usage, go to 'Items' tab.

Each cron run will create an item for each customer if it does not exist at the moment and add new records to existing ones.
In that way you can see current server resources usage from last billing period .
Automatic generation of invoices is based precisely on previously created items.
To view more details click on 'Show usage records' as shown on the following screen.
You can also easily remove billing for specific hosting. To do so, press 'x' in 'Delete' column.

AB2 14.png
It shows detailed information about record usage and quote for that usage.
AB2 15.png
In order to view price for specific element of record, simply drag mouse on it.

The following screen shows situation after running cron only 2 times. Note that first record is always empty as it's task is to initialize billing for specific account.

AB2 16.png
In addition to the above information you can check time of each cron run.

You can also order creation of invoice for product through pressing 'Bill On Demand' .
Note: Bill on demand feature is not available for credit billing.

AB2 17.png

Logs

In logs you will find information about the module activity. You can view informative logs, error logs and critical logs.

Choose your .log file from a dropdown menu and press 'Show' as presented on the screen below.
To remove log simply press 'Delete' instead of 'Show' button.
New log files are created every day to help you find information you are looking for.

AB2 18.png
This is how the 'infolog-YYYY-MM-DD.log' can look like.
AB2 19.png

Awaiting Invoices

Here you can check your awaiting invoices. Invoices can be generated automatically or manually.

On the screen you can see our previously generated invoice for our cPanel Extended account.
To view detailed information about particular invoice press 'Show' .

AB2 20.png
This is the place where you can verify and modify your awaiting invoices. It's worth to check whether invoices are correct to avoid risk.

You already know that you can set up automatic invoice generation in configuration section. Now lets manually generate invoice for your customer.
For this purpose simply click on 'Generate Invoice' .

AB2 21.png
After changing package, invoice is automatically generated for old package.

User Credits

All information related to credit payment for hosting can be found at 'User Credit' tab. As you can see, there are two columns with credits.

First one, 'Internal Credit' contain credits which was not used for payment, but are reserved for it. It was created to increase accuracy of credit billing.
Second column, 'Already Paid For Hosting' contains summary credit payment for hosting.
You can order refund of any hosting through pressing 'Refund' button next to it. Client will receive sum of 'Internal Credit' and 'Already Paid For Hosting' rounded down to 0.01.

File:AB2 21 1.png

Integration Code

Integration code allows displaying usage records for each of your customers in the client area and allows to display pricing on the order form.
AB2 22.png
Exemplary display of usage records in the client area. Note that disabled usage records will not be displayed.
AB2 23.png
Exemplary display of pricing in the order form. Note that disabled usage records will not be displayed.
AB2 24.png

Migration Tool

Migration tool allows you to import configuration from Advanced Billing 1.3.8 or older.

Each product you migrate will be disabled on your previous Advanced Billing.

File:AB2 25.png
To start, press 'Migrate Product' next to product you want to import.
File:AB2 26.png
'Divider Prices' divide prices you have had on your previous Advanced Billing.

Reason of implementing it are changes in pricing system, at old Advanced Billing it was price per month, now it is price per hour.
We recommend using standard, '720' divider. To change it, simply enter value into 'Divider Prices' and press refresh button next to it as shown on the following screen.

File:AB2 27.png
In 'Invoice Settings' , 'Billing Settings' and 'Credit Billing' tab you can configure product billing. Description of this tabs you can find in this article.

You can jump to it through pressing one of following: Invoice & Billing Settings Credit Billing

File:AB2 27 1.png
You can also edit 'Free Limit' , 'Pricing' , 'Displayed Unit' and 'Status' .

At the bottom of the screen you can decide, if you want to generate invoice for accounts you are importing product for.
If yes, simply left 'Generate Invoices' checkbox marked, otherwise unmark it. Afterwards, confirm migration through pressing 'Migrate Product' .

File:AB2 27 2.png
You should see information about changes you are trying to make, confirm them through pressing 'Migrate' button.
File:AB2 27 3.png

Hourly Billing

Hourly billing allows you to charge your customers for each hour of use of the product (hourly billing calculation are based on product 'Registration Date' ).

You can enable hourly billing for any product type.
Regardless of whether it is a server, web hosting account or other, customer will be billed for each hour of using the product.

AB2 29.png

Ticket Billing

Ticket billing works exactly as it sounds. When enabled, it bills you customers for each opened ticket.

As in the case of hourly billing, you can enable ticket billing for any product type.

AB2 30.png

Sample Configuration

In this section we will show you two sample configuration of Advanced Billing.

Two Weeks Billing

In order to set up generating invoice for resource usage each 2 weeks, follow this steps:

1. Go to 'Addons' 'Advanced Billing 2.0.1' and select your product from 'Enable Advanced Billing 2.0 for:' .

AB2 31.png
2. Go to 'Billing Setting' , mark 'Bill on Terminate' checkbox and enter '14' in 'Create Invoices Each' textbox.
AB2 32.png
3. Scroll down and enter your pricing setting, afterwards, press 'Save Changes' .
AB2 33.png
You have just successfully configured billing!

You should see something like on screen below in your Advanced Billing main page.

AB2 34.png

5 Minutes Billing

To bill your client as often as possible follow these steps:

1.Go to 'Addons' 'Advanced Billing 2.0.1' and select your product from 'Enable Advanced Billing 2.0 for:' .

AB2 35.png
2. Go to 'Credit Billing' and mark 'Enable Credit Pay' checkbox.

Afterwards, enter '1' into 'Create Invoices Each ', ' 20' into 'Minimal Credit' and '50' into 'Low Credit Notify' .
With these settings your client will be billed from credit balance as soon as payment for resource usage reach 20$.
He will also receive email if his credit balance fall below 50$.

AB2 36.png
3. Scroll down and enter your pricing setting, afterwards, press 'Save Changes' .
AB2 37.png
You have just successfully configured billing!

In your Advanced Billing 'Configuration' tab you should see something similar to the following screen.

AB2 38.png

How To Update

Due to completely rewritten code in version 2.0, you have to use migration tool in order to upgrade your Advanced Billing to the latest version.

You can find instruction for it in Migration Tool section.

Tips

1. Deactivation of the module removes products configuration, usage records and awaiting invoices.

In order to update module, simply follow instruction in 'How To Update' .

2. Installed Applications usage record supports both Softaculous and Installatron.
3. You can set up as many products as you want.
4. If your client use currency that is not WHMCS base currency (for example, WHMCS base currency is €, while client uses $):

Invoice for him will be generated in his currency, while usage record and calculation in Advanced Billing will be using base currency.

Common Problems

1. When you will see an error message as shown on the screen below, that means your 'cron' directory privileges are insufficient.

To fix this, allow Read permissions to directory. In most cases chmod 755 solves the problem.

AB2 39.png
2. When you have problems with connection, check whether your SELinux or firewall is not blocking ports.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Advanced Billing For WHMCS