Personal tools
Namespaces

Variants
Actions

Recurring Contract Billing For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search

Contents

About Recurring Contract Billing For WHMCS

Recurring Contract Billing For WHMCS will allow you to draw up fixed-term contracts for your clients concerning the offered products and services.

You will be able to define which products require contract acceptance, then set the time span of each contract along with its possible discount and penalty amount.
The module will also let you preview vital statistics and logs gathered in a transparent manner on the dashboard.

  • Admin Area Features:
✔ Create, View And Manage Signed Contracts
✔ Create Multiple Contracts Per Product
✔ Request Contract Signing For Selected Service
✔ View Recently Signed And Ended Contracts
✔ View Contracts And Revenue Summaries
✔ Configure Contract Content
✔ Configure Contract Signature Types
✔ Define Time Of Notifications Before Contract Expiration
✔ Define Time After Which Contract Is Defined As Broken
✔ Define Services Suspension Rules
✔ Configure Sign Types
✔ Customize Module Language Files With "Translations" Tool
✔ View And Manage Logs
  • Contact Features:
✔ Define Contract Content In Multiple Languages:
✔ Create Contract Content With WYSIWYG Editor
✔ Use Merge Fields For Contract Template
✔ Create Contract Templates:
✔ Assign Product To Contract Template
✔ Define Discounts And Penalty Types
✔ Define Multiple Contracts Sets For Specified Currencies And Billing Cycles:
✔ Define Contract Length - Up To 5 Years
✔ Define Discount And Penalty Amounts
✔ Define Days Before Expiration To Cancel Contract Without Penalty
✔ Define Trial Period Length
✔ Define Time To Send Renewal Notification
✔ View Total And Recurring Prices
✔ View Amount Of Penalty
✔ Choose Contract Signature Type:
✔ Adobe Sign
✔ Checkbox
✔ DocuSign
✔ Dropbox Sign
✔ File Upload
✔ SignNow
✔ Define Contract Length Selection Type:
✔ Dropdown Menu
✔ Allow Orders Without Contract
✔ Define Renewal Type
✔ Renewal Without Contract
✔ Renewal With Contract
✔ Cancel
✔ Toggle Availability Of Cancellation Request
  • Client Area Features:
✔ Choose Contract Length During Order
✔ View Contract Content Before Accepting It
✔ Sign Contract Using Configured Signature Type
✔ View Details Of All Signed Contracts
✔ View History Of Any Signed Contract
✔ Receive Contract Email Notification Upon Order Creation
  • General Info:
✔ Multi-Language Support With Custom Translations Tool
✔ Supports PHP 8.1
✔ Supports WHMCS Themes "Six", "Twenty-One" And "Lagom WHMCS Client Theme"
✔ Supports WHMCS V8.10 Back To WHMCS V8.7
✔ Requires ionCube Loader V12 Or Later
✔ Easy Module Upgrade To Open Source Version

Installation and Activation

This tutorial will show you how to successfully install and configure Recurring Contract Billing For WHMCS.

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

Note: If you are still using any versions of Recurring Contract Billing For WHMCS prior to v2.x, read about it here.

Installation

1. Log in to our client area and download the module.
RB2 1.png
2. Extract the package and upload its content into the main WHMCS directory.

The content of the package to upload should look like this.

RB2 4.png
3. When you install Recurring Contract Billing For WHMCS for the first time you have to rename 'license_RENAME.php' file.

The file is located in 'modules/addons/recurring_billing/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

RB2 5.png
4. To configure your license key, you have to edit the previously renamed 'license.php' file.

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

RB2 6.png
5. The next step is setting up 'storage' folder as recursively writable.

It is located in 'your_whmcs/modules/addons/RecurringContractBilling/'.

RB2 7.png

Activation

7. Now, you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area and proceed to 'Setup' 'Addon Modules'.
Afterwards, find 'Recurring Contract Billing' and press 'Activate' button.

RB2 8.png
8. In the next step, you need to permit access to this module.

To do so, click on 'Configure' button, tick checkboxes to assign desired admin roles.
Press 'Save Changes'.

RB2 9.png
9. Finally, set up the cron command line provided below and define its frequency (1 day interval is suggested).
php -q /yourWHMCS/modules/addons/RecurringContractBilling/cron/cron.php dailyCron

The cron features multiple commands:

  • dailyCron – Includes every option in one cron, so there is no need to set up the other ones.
  • contractNotifications – Sends out notifications to the clients whose contracts are about to expire. You can define the timing in the 'module configuration' .
  • finishContracts – Necessary to automatically finalize a contract when it ends. How long a contract lasts can be defined while setting up 'contract lengths,' which the client can choose between while ordering a product.
  • generatePenaltyInvoices – Generates invoices when a contract is breached, you can specify the penalty when setting up a 'contract template' .
  • suspendNotContractedServices – Suspend services without an active contract when that is required. It will automatically suspend any active service that requires a contract if no signed contract is detected.

You can set up each function as a separate cron, or set up 'dailyCron' to utilize all functions at once.

10. You have just successfully installed Recurring Contract Billing For WHMCS!

Configuration and Management

Once you have properly installed and activated the product you may move to its actual configuration.

Read the below sections to learn how to use Recurring Contract Billing For WHMCS completely.

Configuration

In order to start using your Recurring Contract Billing For WHMCS move to 'Addons → Recurring Contract Billing'.

By default, you will be moved to the addon's dashboard with a guide opened. You will find short notes on how to configure the product there.
In this article, we will expand these instructions a bit more.

RB2 10.png
Hide the guide when you have completed the configuration and learned how to reconstruct the process. You can do that under 'Utilities' 'Configuration.'

Contract Content

First of all, create your first contract's content. To do so, move to the 'Contracts' 'Contract Content' section and press the 'Create Content' button. Decide on a name for your contract content and press 'Confirm.'
RB2 11.png
You will be automatically moved to the content editing page. Here you can compose the content of a contract.

Fill out the field with 'Content', you may use 'Merge Fields' to do so, those are categorized into:

  • Product Fields
  • Hosting Fields
  • Client Fields
  • Contract Fields

Use the advanced edition tool to perfectly shape the contract.

RB2 12.png

You can also change the content's name in the 'Name' bracket. Moreover, you may compose the contract translation.
Select the pen icon to add or remove languages. Do not forget to 'Confirm' the changes once you have finished.

RB2 12 1.png

Use action buttons to edit the contract again or delete it if you are sure it is no longer needed.

RB2 13.png

Sign Types

Under 'Utilities' 'Sign Types' you can configure the methods of signing contracts, which you will then be able to use for creating a contract template.
You can configure the following methods:
  • Adobe Sign
  • DocuSign
  • DropboxSign
  • File Upload
  • SignNow

Note: The checkbox sign method does not require any configuration, but you will still be able to select it when creating a contract template.

RB2 14.png

Adobe Sign

The Enterprise plan of Adobe Sign is required to use this option. Take the following steps to set it up:

1. Log in to your Adobe Sign profile.
2. Go to the 'Account' tab.
3. Choose the API Applications from the menu on the left and press the + button.

RB 43.png

4. Enter the 'Name' and 'Display Name' of your application and select 'CUSTOMER' domain. Press 'Save' when ready.
5. Now, select the created application in the list and click on 'View/Edit.'
6. While there, you will find your 'Client ID' and 'Client Secret' which are required for the configuration. Please keep them safe.
7. Next, enter 'Configure OAuth for Application,' you need to provide a proper callback 'Redirect URIs' from your WHMCS installation in the following format:

https://yourdomain.com/modules/addons/RecurringContractBilling/app/Api/adobeSignAuthorize.php

Note: Provided URI also has to start with https:// .
8. Finally you have to enable all the scopes. Press 'Save' when ready.

RB2 141.png

9. Now return to the configuration of the WHMCS module and enter the previously obtained data.
As the 'Client Email' use the one from your Adobe Sign login. The 'URL Shard' field contains your region identification. To find it, you need to log in to your Adobe Sign.
The environment identifier is found in the URL address, just before the echosign.com (or adobesign.com) portion. For more info, please click here
Do not forget to 'Confirm' the settings first because only then you will be able to click the 'Authorization' button.

RB2 15.png

10. You will have to confirm your access to the authorization for Adobe Sign.

RB 46.png

11. Finally, if you provided all data correctly you should receive the notice that authorization has been completed successfully.

DocuSign

You need to have at least the Basic API plan of DocuSign to use this option.

1. You can set it up in to ways:

  • for the 'Demo' environment, log in here.
  • for the 'Live' environment, log in here.

2. After successful login to the selected environment, select 'Apps and Keys' tab under the 'Integrations' section on the left side menu.
3. Now press the 'Add App and Integration Key' button as presented below.
Important: Integrator keys can be created only through a developer demo account. To go live with your API integration, you need a live DocuSign production account to promote the key to!

RB 47.png

4. Name the app/key.
5. You should now see the 'Integration Key'. Save the 'Integration Key' for later use.

RB 48.png
6. Generate your Private Key, to do so press "Generate RSA" under 'Service Integration'. Once ready a new window with generated keys will appear, copy the private key.

7. In 'Redirect URIs' tab press 'ADD URI' button. There, you need to provide a proper callback 'Redirect URIs' from your WHMCS installation in the following format:

https://yourdomain.com/modules/addons/RecurringContractBilling/app/Api/docuSignAuthorize.php

Note: Provided URI also has to start with https:// .

RB 48 1.png
8. You will also need your 'User ID:
RB 48 2.png

9. Now return to the configuration of the WHMCS module where you can enter the previously obtained data.
Provide:

  • Impersonated User ID - it is your 'User ID.'
  • Integration Key - you saved the 'Integration Key' earlier.
  • RSA Key - the 'Private Key' you have generated.
  • Redirect URI - the 'Redirect URI' you included before.

Choose if you are using a demo environment
Do not forget to 'Confirm' first because only then you can click the 'Authorization' button.

RB2 16.png

10. You will have to confirm your access authorization for DocuSign.

RB 51.png

11. Finally, if you provided all data correctly you should receive notice that authorization has been completed successfully.

Dropbox Sign

A Dropbox Sign standard account is required to use this option. Please take the following steps to set it up:

1. Log in to your DropboxSign profile.
2. Go to the 'API' tab.
3. Find the 'Generate Key' button, click on it, and give the key a name.
4. Copy the key.

RB2 15 1.png

5. Now return to the configuration of the WHMCS module and enter the API Key and your DropboxSign login email.
If you have a demo DropboxSign account, enable the test mode.
When ready, click 'Confirm' first, then 'Authorize.'

RB2 15 3.png

6. Finally, if you provided all data correctly you should receive the notice that authorization has been completed successfully.

File Upload

Here you can configure the minimum and maximum size of files uploaded by your clients as contract signs.

Note: Currently all image, MS Word and PDF formats are supported for upload.

The values provided here must be given as kilobyte (KB) units. E.g.:

  • 1024 KB = 1MB
  • 1048576 KB = 1024 MB = 1 GB

So, if you want to allow uploaded files e.g. being in between 1 and 8 megabytes in size provide '1024' and '8192' values accordingly.
If you do not want to limit the uploaded file sizes, leave the '0' value.

Important: The maximum value of the uploaded file size also depends on the configuration of these values in the php.ini file of the server.
If you want to give a higher value, you must also increase the 'upload_max_filesize' and 'upload_max_filesize' in php.ini file accordingly.
Otherwise, the higher value specified in the module will automatically be decreased to the values specified in the php.ini configuration file.

RB2 17.png

SignNow

A SignNow account is required to use this option. Take the following steps to set it up:

1. Log in to your SignNow profile.
2. Go to the 'API' section. You can find it at the bottom of the left-side menu.
3. Click on the 'Add Application' button and name the application.

RB2 16 1.png

4. Copy your 'Basic Authorization Token'.

RB2 16 2.png

9. Now return to the configuration of the WHMCS module and enter the following fields.

  • Username - Your SignNow username.
  • Password - Your SignNow password.
  • Bacic Auth Token - The token you just copied.
  • Email - Any email, it will be used as SignNow email signature.

If you are using a trial SignNow account, enable the demo mode.
Do not forget to 'Confirm' the settings first because only then you can click the 'Authorization' button.

RB2 16 3.png

11. Finally, if you provided all data correctly you should receive the notice that authorization has been completed successfully.

Contract Templates

Now, that you have a contract's content draft, move to 'Contracts' 'Contract Templates'.

In this section, you can predefine which contract content draft a specific product a template will refer to.
Press 'Create Template' to begin.

RB2 18.png
Fill out the contract template form. Name the template and choose content names from the ones you prepared previously (see the 'Contract Content' section).
Select the product that this template will be available with.
Note: You can assign only one template to a single product, it is not possible to alter the product assignment once you save the changes!

Define one of the methods by which your customers will be able to sign contracts. Choose from the following:

  • Adobe Sign
  • DocuSign
  • DropboxSign
  • SignNow
  • File Upload
  • Checkbox

Note: Don't forget to set up their initial configuration.
Choose Fixed or Percentage values for Discount and Penalty amounts.
Define contract renewal option:

  • Renew with contract
  • Renew without contract
  • Cancel

Finally, you may decide whether to allow your clients to cancel the contract while it is active or not.
Once ready, remember to 'Confirm' the changes.

RB2 19.png
In the case of the DocuSign template, you may also define the exact position of the signature on the contract together with the page number and sign phrase.
Please refer to the following article to learn how to position the signature. If you cannot see the relevant section, make sure to choose DocuSign as Sign Type and confirm changes.
If you wish to provide the phrase under which a client will sign a contract (this phrase has to be included in its content), please use the 'Sign Phrase' configuration field.

Note: If you cannot see the relevant 'Signature' section next to the 'Template' section, try clicking on 'Confirm' first and see if it appears.

RB2 20.png
Once you have added a new template, you have to create 'Contract Lengths'. An appropriate box should appear next to the template form.
Pick a currency and billing circle. Once those are specified, click on 'Create Length' to begin.
RB2 21.png
In this form you can define:
  • Length - how long such a contract shall last. If you want, you can include 'Order Without Contract,' to allow clients to make orders, without signing a contract.
  • Discount Amount - a fixed amount or percentage for the discount, depending on the previously selected type in the template form.
  • Penalty Amount - a fixed amount or percentage, depending on the previously selected type in the template form.
  • Trial Period - number of days when a client may resign from the contract without any consequences or giving the reason for resignation.
  • Notice Time - define the time when a renewal notification will be sent.

Click on 'Confirm' when finished.

RB2 22.png

Module Configuration

The last step mentioned in the 'Guide' is setting up 'Notifications,' 'Default Penalty Grace Period,' and 'Service Suspension Rules'. These options can be found under 'Configuration' tab in 'Utilities' section.
Select which email notifications you want your clients to receive and enter the number of days before the due date to send the notification.
RB2 23.png

Move to 'System Settings' → 'System' → 'Email Templates' → 'General Messages' in your WHMCS to view and edit the notifications. You will find them under 'Ending Contract Notification' name.
Enabled notifications are sent automatically with the daily cron run.

RB 17.png
Define how the 'Contract Lengths' will be displayed in the Client Area, by choosing the 'Field Type.'
RB2 24.png
Define number of days when a client can be late with payment.
If a client misses making payment for longer than the number of days specified here, a penalty will be imposed on such client.
Note: Penalty type and amount are specified in the 'Contract Template' details.
RB2 25.png
You may decide if services shall be automatically suspended after the provided number of days pass, without the client signing the contract.
You may exclude services ordered before a certain date from this option.
RB2 26.png
Finally, you can turn off the guide or turn it on again once you have hidden it.

'Save' the changes once your configuration is ready.

RB2 27.png

Management

In the following sections we will try to explain how previously configured contracts are imposed on clients.

Client Area

Place Order

To illustrate the process, let's say a client orders one of your products with recurring payment (it is important that you have previously prepared a contract for this product).

Once the client reaches checkout, the contract field appears. They may choose the contract length from available options, view the contract and sign in.

RB2 28.png
If the client tries to complete the order without signing the contract, this error message will be displayed.

Note: You can add an option to order the product without signing the contract by choosing 'Order Without Contract' while adding 'Contract Lengths' in the module addon.

RB2 29.png

Service Contracts

To view all accepted contracts, find the 'My Contracts' tab.
RB2 30.png
There is a full list of client's contracts with the most important information about them.
Including: 'Product/Service Name,' 'Recurring Amount,' 'Sign Date,' 'Contract Length' and 'End Date' as well as its 'Status.'

Use action buttons to:

  • View the contract details page.
  • Download a PDF version of the contract.
  • See the contract content changes history.
RB2 31.png
View the contract's details. Press 'Show' to see its details directly in the client area or press 'Download' to obtain its PDF version.

If conditions are met, at the bottom of the contract the client will find buttons to renew or cancel the contract.
The conditions are:

  • The contract is active.
  • The notice time, specified while creating the length, has passed.
  • The contract renewal type is set to: 'Renew With Contract.'
RB2 32.png
History of any changes in the contract content:

Click on the 'Page' icon to see the previous version of the contract.

RB2 33.png

Signed Contracts

In 'Signed Contracts' section under 'Contracts' you will find a list of all contracts accepted by your clients.

On the main page, you can see the name of the client with the service used, the recurring payment amount for their product, and contract details such as signing and ending dates, length and status.
Use action buttons to edit, cancel or delete contracts. If you use the edit button, you will be moved to a full view of the contract.

RB2 35.png
On this page, you can once again see details of a contract accepted between you and the client.

You are allowed to modify the content, status and details of this very contract. Note that used 'Contract Content' will not be altered, only the signed item.

RB2 36.png
In case you decide to make any changes to the contract, the previous (before changes) version of the contract is added to the 'History'.

Thanks to that, you may always come back to the original.
In this step you may also add notes for future reference. Make sure to save changes.

RB2 37.png
Create Contract
Above the list of 'Signed Contracts', you will find 2 buttons. 'Create Contract,' and 'Request Signing.'
RB2 37 1.png
Let us cover 'Create Contract' first. Clicking on the button will redirect you to the form where existing contracts, for example, signed manually, can be uploaded into the module and managed.

First of all, select the client. Then pick the service the uploaded contract is related to, or select none if your contract is an independent document.
Choose the contract length: strict period or a custom length; note that the ending date is selected automatically based on the contract length.
Select the contract's status and renewal type. Specify if cancellation is allowed. If you have the contract in the form of a file, you can upload it here.
Finally, you may also add your private notes. Confirm changes to finalize the action.

RB2 37 2.png
'Request Signing' allows you to send emails directly to your clients requesting them, to sign a contract for a specific product and specific length.

Dashboard

On the Dashboard of your addon you will find the most important information in a nutshell.

These are:

  • Recently Signed Contracts
  • Recently Ended Contracts (including finished, canceled and broken ones)
  • Contract Summary
  • Revenue Summary
RB2 38.png

Translations

Customizing language files is now extremely easy with the "Translations" tool that is now available directly in the addon.
Its user-friendly design makes managing various language file tweaks a smooth and efficient process.

Prepare translations for the original English files with this handy built-in tool. For specific instructions on how to use this tool please refer to its dedicated article, you will find it here.

RB2 35 1.png

Logs

In the 'Logs' section any attempted actions on any contract are recorded and stored for your convenience.

Use the action buttons to see details or delete each log entry. Multiple logs can be deleted at once by utilizing the mass selection function.

RB2 39.png
Furthermore, the logs feature additional action. Changing the logs' settings, exporting the logs to a '.csv' file, and a way to delete specific log types.
RB2 40.png
In the settings you can specify which log types should be recorded, and whether they should be deleted automatically after a specific time.
RB2 41.png
While exporting you will pick a time frame and the log types to export.
RB2 42.png
Here you can decide which log types to delete, you can also specify how old the logs have to be to qualify for deletion. Leave the first field empty to delete all logs.
RB2 43.png

Advanced Billing For WHMCS Integration

It is possible to combine your Recurring Contract Billing For WHMCS module with one of our most favored products: Advanced Billing For WHMCS.

In order to configure the two modules to work together move to 'Advanced Billing addon' → 'Configuration' and find the product you want to work with.
Move to 'Settings' → 'Recurring Billing' section, as billing type select 'Bill On Invoice Generation' option.
Learn more about Advanced Billing configuration here.

RB 40.png
When ready, Recurring Contract Billing For WHMCS will be in constant cooperation with the other module within the configured product. If you want to combine the functionalities
of the two modules for more than one product, please remember to select the 'Bill On Invoice Generation' option for all of them.

Tips

1. The contracts are automatically broken in two cases:
  • The invoice has not been paid - module counts the number of days set up in configuration 'penalty after x days' until the moment the payment is noted in the system.
  • The client has sent a cancellation request for the product.
2. As this module supports a template system, any changes made in the module's template files will be saved after the update process.

Update Instructions

An essential guidance through the process of updating the module is offered here.

Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues.
Additionally, you will find a current list of supplementary actions necessary for a smooth update process there.

Important: If you are updating the module to version 2.0.0, you must deactivate the old addon module and delete its files before performing the update.

This will ensure all potential conflicts are avoided. Your data will be migrated to the new version of the module after its activation.
However, the connection between the module and the sign providers will need to be re-established, because of new redirect URIs.
You can find instructions on how to do this in the Sign Types section.

Upgrade Guide

Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?
There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.

Opt for the Open Source version of your Recurring Contract Billing For WHMCS module to unlock these benefits.
Simply click on either the Get Source Code or Upgrade To Lifetime button found on the product's page in our client area to complete the one-step upgrade process, with a dedicated discount already applied.

Follow a comprehensive guide covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. Remember that Recurring Contract Billing For WHMCS contracts can be applied to products with recurring payment type only.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Recurring Contract Billing For WHMCS