Skip to content

Install and configure WHMCS to work with the HOSTKEY billing system

In this article

Required Software

  • reseller module for WHMCS: download;
  • WHMCS version 8.8 or higher.

Module installation

Extract the contents of the archive to the root of the accounting system.

Activate module in WHMCS

After copying the module to the WHMCS directory and configuring file system permissions, you need to activate the module. To do this:

  1. Go to the section >> System Settings >> Apps & Integrations >> Addon Modules;
  2. Find the HOSTKEY VPS/Dedicated module in the list and activate it by clicking the button Activate;

  3. Customize the module by clicking the Configure

    • API Url - path to the HOSTKEY billing system. Default value https://invapi.hostkey.com/;
    • API key - key to access the billing system. Obtain it by following instructions;
    • Preset name prefix - prefix for naming VPS/VDSs so that they can be distinguished in the WHMCS list. By default HKP-;
    • Default product group - name of the product group. Default value Hostkey servers;
    • Access Control - list of user groups that have access to this module.

    Attention

    If a group is not checked under Access Control, the module will not be available for that group and will not be displayed in the menu, even for the administrator.

If everything is done correctly (including setting permissions), the HOSTKEY VPS/Dedicated section will appear in the Addons menu.

  1. Go to Add-ons >> HOSTKEY VPS/Dedicated and select the products you wish to resell:

    • Import VPS products - VPS server resale;
    • Import bare metal products - resale of dedicated servers;
    • Import GPU products - GPU server resale;

    Next, click the button Activate Products.

If the module is correctly connected and activated, a message about successful download of HOSTKEY products will appear.

and a suggestion to go to the product specific settings in the System Settings >> Product Services menu.

Note

In case of large amount of information, the page may terminate with code 504 Gateway Timeout. For the first loading of the product list we recommend to execute the command in the billing root

php modules/addons/presetsload/cron.php
In both cases, information about available products is requested from the HOSTKEY server and loaded into the billing database.

Customize specific products for resale

By going to System Settings >> Product Services you will see a table of all the products available to you for resale.

By clicking on the icons in the rightmost columns, you can change the product settings or remove it from the list. Most of the settings are determined by the WHMCS settings and we will only focus on those that are critical for resale.

Edit a specific product

Clicking on the Edit icon will take you to the Edit Product parameter modification section.

Detail tab

This tab allows you to change the product name that will be displayed on your storefront.

Also, by checking the Hidden to hide the product from the order form without removing it.

Price tab

Use this tab to set the price of your product in the currencies available to you.

You can set three types of payment (Payment Type):

  • Free - the product is distributed free of charge;
  • One Time - one-time payment for one month of use;
  • Recurring - recurring payment for a period of time.

You set the price for each period and currency separately, giving you the flexibility to adjust your pricing policy:

  • One Time/Monthly - One time payment or recurring monthly payment.
  • Quarterly - payment every quarter (3 months)
  • Semi-annual - payment every six months (6 months)
  • Annual - Payment for one year (12 months)

There are two separate prices available to you:

  • Setup Fee - the price for installing the product;
  • Price - the selling price of the product.

Attention

Your price must be higher than that shown in the Price boxes, otherwise you will end up selling "underpriced".

After changing the parameters and price, click Save Changes and save the settings for this product.

After confirming the successful saving of the settings, click and the button in the upper right corner Back to product list to return to the product table.

Once configured, products appear in the client dashboard.

Payment activation for ordered products

To pay for any ordered products, your HOSTKEY account balance will be used. Please ensure that the automatic payment from balance mode is enabled.