Personal tools


Hosting Renewals For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search


About Hosting Renewals For WHMCS

Hosting Renewals For WHMCS is a module which enables you to handle the billing cycles, recurring payments and renewals of services belonging to your customers in a unique and user-friendly way.

The module will grant your clients the ability to control the activation of their automatic renewals, they will also be able to decide on the renewals of their web hosting services, not to mention it will take less time to change the billing cycle.
Thanks to Hosting Renewals, you will posses the faculty of configuring billing cycle, changing rules, preparing various discounts and your customers will start receiving fit for purpose email notifications.

  • Client Area Features:
✔ Renew Services Before Due Date
✔ Renew Domain And Addons Along With Service
✔ Toggle Auto Renewals
✔ Change Billing Cycle & View Discounted Price Difference
  • Admin Area Features:
✔ Choose Available Billing Cycles
✔ Configure Client Area Features
✔ Define Application Of Discount For The Change Of Billing Cycle
✔ Choose Between Two Types Of Discounts - One Time And Recurring
✔ Toggle Or Force Domain Renewal Along With Service
✔ Toggle Or Force Addons Renewal Along With Service
✔ Toggle Upfront Renewal
✔ Toggle Recurring Amount From Service Setting
✔ Disable Auto Renewal For New Services
✔ Send Email Reminders About Upcoming Renewals
✔ Define Multiple Email Templates For Email Reminders
✔ Perform Bulk Changes On Multiple Services
✔ Change Settings
✔ Add Reminders
✔ Toggle Auto Renewal
✔ View Logs
  • General Info:
✔ Multi-Language Support
✔ Supports PHP 5.6 Up To PHP 7.2
✔ Supports WHMCS Template Six
✔ Supports WHMCS V7.2 And Later


This tutorial will show you how to successfully install and configure Hosting Renewals For WHMCS.

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

Note: If you are still using any of the module's previous versions prior to v3.x, follow these instructions.

1. Log in to our client area and download the module.
HR3 1.png
2. In the downloaded file you will find two packages that support different PHP versions.
As presented on the screen below, the first one is dedicated to PHP 5.6 up to PHP 7.0, while the second one is aimed at PHP 7.1 up to PHP 7.2.
It does not apply to open source versions.

Note: You can check the current PHP version in your WHMCS. To do so, proceed to 'Utilities' › 'System' › 'PHP Info'.

PHP56 72.png
3. Extract the downloaded file and choose the one with the right PHP version. Upload and extract the PHP file into the main WHMCS directory.

The content of PHP version files should look like this.

4. When you install Hosting Renewals For WHMCS for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/HostingRenewals/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

HR3 3.png
5. In order to configure your license key, you have to edit a previously renamed 'license.php' file.

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

HR3 4.png
6. Now, you have to set up chmod for the 'storage' folder located in 'your_whmcs/modules/addons/HostingRenewals'.

You will be now allowed to read the activity logs in the module.

HR3 4 1.png
7. The next step concerns setting up a cron job (every hour suggested).

Cron will be used for the reminders which you will set later on.
Use cron job below but switch 'your_whmcs' with your root WHMCS path.

php -q /your_whmcs/modules/addons/HostingRenewals/cron/cron.php EmailReminders
8. Next, you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to 'Setup' 'Addon Modules'. Afterward, find 'Hosting Renewals' and press the 'Activate' button.

HR3 5.png
9. In the next step you need to permit access to this module.

To do so, click on the 'Configure' button, tick 'Full Administrator' and press 'Save Changes'.

HR3 6.png
10. You have just successfully installed Hosting Renewals!

Access your module now at 'Addons' 'Hosting Renewals'.

HR3 7.png

Configuration and Management

Hosting Renewals For WHMCS module allows your customers to fully manage their billing cycles and recurring payments.

Read through the below instructions to learn how to turn on/off auto-renewals, alter billing cycles and manage customized email notifications.


You can enable Hosting Renewals For WHMCS only for the products that have recurring payments configured.

Proceed to 'Addons' 'Hosting Renewals' 'Product Settings' and choose from the list the product you wish to enable for renewals.

HR3 8.png
Press the symbol marked on the screen to configure the rules of your product.
HR3 8 11.png
Available options:
  1. Serves simply to enable/disable renewals for the product.
  2. If selected, clients are allowed to enable/disable automatic renewals.
  3. If selected, clients are allowed to change the billing cycle.
  4. Once enabled, automatic renewals will be consequently disabled for all new services.
  5. Renew a domain along with the renewal of the service it belongs to.
  6. Allows your clients to renew an addon while setting the renewal of the related service.
  7. Enable the renewal of a new domain.
  8. If this option is enabled, the renewals of addons can be arranged.
  9. Allow clients to renew the service before its renewal date.
  10. If selected, renewal reminders are not delivered when automatic renewal is on.
  11. When selected, the custom recurring amount from the service's settings will be used, see this picture.
    Any other way, the default one configured along with the product's arrangements will be applied.(check it here)
    However, it does not apply to the setup of addons and domains.
  12. Enable your clients to change the billing cycle in case of an existing unpaid invoice.
  13. If enabled, the 'Immediate' cancellation requests are no longer blocked, causing the service to be canceled after the cron execution.
    By default, this sort of an action is not available due to the fact that the module uses the 'Override Auto Suspend' feature disabling the immediate cancellations.
    Note that the 'End Of Billing Period' cancellation type will work normally regardless of the current status of this setting.
HR3 8 1.png
If you enabled the option allowing to change the billing cycle in the client area, you must also decide between which billing cycles the switch can be made.

On the screen below you can see the 'Choose Available Billing Cycles' table with available billing cycles.
Clients will be able to choose between billing cycles from the column of their current billing cycle.
For example, settings on the following screen will enable clients to switch any billing cycle they like.

HR3 8 2.png
Thanks to the 'Mass Action' feature you are allowed to simultaneously control the settings of multiple products.

Take a look at the screenshot below.

HR3 18 2.png


It is wise to inform your clients about an incoming due date, you can do it by setting up 'Reminders' .

Since along with the module activation not a single email template is created for email notifications, you are advised to generate some by yourself
You can easily create additional email templates for notifications.
Move to 'Setup' section in your WHMCS admin area and press 'Email Templates' .

HR3 823.png
Afterward, choose 'Product/Service' as an email template type and enter the name under which this email template will be visible in your WHMCS.

Click on the 'Create' button.

HR3 10 3.png
You will be moved to email template edition page. Start by filling in your company name, email address and email subject.

Next, create your email template content in the textbox marked on the following screen.
Press the 'Save Changes' button.

HR3 11.png
You can also use 'Merge Fields' in your email template.

To view the full list of fields, scroll down. These codes are replaced with the actual data during sending email.

HR3 12.png
Once you have successfully created your new template and picked its billing cycle, we can move to adding a reminder itself.

Simply click the Add Reminder button to do so.

HR3 112.png
The Status field should be automatically set to active, please note, however, that you can disable the reminder any time you want.

Next, choose the desired template from the dropdown menu of custom templates including the previously created 'Last Day Notification' .
The section named Period refers to the number of days before the end of the cycle intended for sending a reminder.
Finally, press the 'Add' button.

HR3 9.png


In the 'Discounts' section you may set up various discounts for any alterations of renewals of services.
HR3 15.png
To start creating and modifying your discount click on Add Discount.
HR3 12 5.png
Start with selecting primary attributes including the name and the products eligible for the discount.

Then, choose whether the discount is supposed to be a Percentage or a Fixed one.
In the next step, decide on its value.

Now, you are required to select between two types of discounts:
1. One time discount - it applies to a single billing cycle only.
2. Recurring discount - it will be applied to all billing cycle payments, until your client again changes the billing cycle.
For example, if a client switches to a quarterly billing cycle from any other cycle, they will receive a $35 discount for a payment in the first billing period.
Note: Discount applies only to the price of the service, both addons and domains even whilst being renewed accordingly, are not qualified for the discount.

HR3 12 6.png
As you can see on the following screen, all discounts are listed below.

Each of them can be either removed or edited by pressing the appropriate button.

HR3 126.png


All module activities are recorded in 'Logs' .

Note: You will have no visible logs here if there are no logged actions yet.

HR3 12 2.png
In case you no longer wish to see a particular log you can easily remove it.
Select a particular entry and click on the bin icon as presented on the screen below .
HR3 12 3.png
In order to delete multiple logs at the same time you can simply take advantage of the 'Mass Remove Action'.
HR3 12 14.png

Client Area

Depending on the configuration per product your clients will be allowed to manage their renewals in their client area.
HR3 17.png
They can see the current status and use available buttons to perform allowed actions:
  • Renew service
  • Turn on/off the auto renewal
  • Change a billing cycle
HR3 18.png
Press the Choose Billing Cycle button in order to change a current billing cycle to a new one.
HR3 19.png
In the next place, choose a new billing cycle from the dropdown menu.

Clients will also have their domains and addons renewed, undesired items can be simply unchecked, unless you have chosen either the 'Force Domain Renewal'
or 'Force Addons Renewal' during customizing your 'Product Settings' at the previous stage of the configuration.

HR3 26.png
Once you do that, check the total amount and click Confirm.
As you can see, the chosen option includes the previously configured discount.
HR3 27.png
A new invoice has been created.

Therefore, the billing cycle is now set to 'Annually'.
Note, however, that only the cycle related to the service itself has been modified, unlike the cycle of either the addons or domains.
These will be separately billed, according to the introduced cycle's alteration:
'Monthly' → 'Annually' results in new 12 cycles visible on the invoice.

HR3 28.png


1. If your client turns off auto renewal and does not run the renewal manually, then the service status will change to suspended/terminated after a certain time period.

Time period depends on WHMCS settings at 'Setup' 'Automation Settings' 'Automatic Module Functions. '

2. Hosting Renewals For WHMCS supports all billing cycles, from monthly to triennially.

Depending on the chosen billing cycle, displayed value of a renew button is changing according to the following code which is located in 'language' directory in your language file:

$_LANG['addonCA']['hostingActions']['Monthly']       = '1 Month';
$_LANG['addonCA']['hostingActions']['Quarterly']     = '3 Months';
$_LANG['addonCA']['hostingActions']['Semi-Annually'] = '6 Months';
$_LANG['addonCA']['hostingActions']['Annually']      = '1 Year';
$_LANG['addonCA']['hostingActions']['Biennially']    = '2 Years';
$_LANG['addonCA']['hostingActions']['Triennially']   = '3 Years';
3. If you want a template message to be sent to users with the auto-renewal 'on' or 'off' option, you may use the below example:
{if $hosting_auto_renew eq "on"} Service will be automatically renewed in {$service_next_due_date} days. 
{else} Service will expire in {$service_next_due_date} days.  {/if}

Update Instructions

Essential guidance through the process of updating the module is offered here.

Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.


While using the 2.X version of our module, note that no data can be migrated due to the fact that we did not implement the migration from any of the previous versions of Hosting Renewals, so the module needs to be configured from scratch.

Note: Remember that in case you wish to switch to the latest version, you need to reissue your license first.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
WHMCS Modules
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
Hosting Renewals For WHMCS