SiteHost

WHMCS Registrar Module

WHMCS is a client management, billing & support solution for online businesses and the SiteHost Registrar Module integrates with WHMCS to allow domain registration, renewal, and transfers, as well as DNS management automatically via the SiteHost API. This document assumes you have a working WHMCS install.

Get the SiteHost Registrar Module and API Key

First of all, download the latest version of SiteHost Registrar Module from here.

Next, in SiteHost Control Panel, create an API Key under the API module that has access to the DNS and Domain (SRS) modules.

As a security best practice, we recommend locking the key down to the IP address of your WHMCS server.

Creating An API Key

Please check the SiteHost API article if you are having difficulty setting up the API Key.

Install the SiteHost Registrar Module

The SiteHost Registrar Module is distributed as a compressed folder that must be copied over to your WHMCS installation.

  1. Download the zip file into a temporary directory.
  2. Decompress the module and copy the sitehost/ folder into the folder /path/to/whmcs/modules/registrars in your WHMCS installation.

Setup the SiteHost Domain Registrar

When the module folder has been copied over, the SiteHost Registrar Module must be enabled and configured within WHMCS.

  1. Log into your WHMCS Administration area (e.g.: http://example.com/whmcs/admin)
  2. In the "System Settings" menu, click "Domain Registrars".
  3. Find the "SiteHost" registrar and select the Activate Button.
  4. Copy https://api.sitehost.nz/ into the "APIServer" field.
  5. Copy the API Key into the "APIKey" field.
  6. Click "Save Changes".
  7. The module has a script that should be run daily to ensure that expiry dates, next due dates and domain statuses are always up to date inside your WHMCS system. The command to run is displayed under the Domain Synchronisation Cron heading. See how to set up a cron job to run on a SiteHost server, otherwise, refer to the control panel or server documentation for the server running WHMCS.
  8. To use the DNS feature, we recommend setting the default name servers as the official SiteHost Name Servers: (System Settings > General Settings > Domains)

WHMCS also has instructions on how to configure a registrar.

Setup Domain Pricing

Prices must be set for registration, renewal, and transfer for all the TLD's that you want to offer clients.

  1. Log into your WHMCS Administration area (http://example.com/whmcs/admin)
  2. Go to System Settings > Domain Pricing.
  3. Type any TLDs that you wish to allow registration/transfer/renewals in the boxes on the left.
    • Make sure you type a full-stop before the TLD eg: .co.nz - not co.nz.
  4. Click the checkbox for EPP code to turn it on (Auth / EPP code / Transfer Secret is required for domain transfers). EPP is another name for Auth code.
  5. Click the checkbox under DNS Management if you would like to allow clients the ability to update their DNS records.
  6. If you would like domains to be automatically registered as soon as the invoice for the domain has been paid, select "SiteHost" from the Auto Registration select box.
  7. Click "Save Changes".
  8. Select "Pricing" for the TLD you want to alter. Enter the prices for the operation type and term into the pricing matrix.

WHMCS also has instructions on how to configure domain pricing.

(Optional #1) Free Transfer of .nz Domains

Whenever a domain is transferred to WHMCS, it will always be renewed for one year, this includes .nz domains.

However, SiteHost allows .nz domains to be transferred without renewal (meaning free of charge), given that the domain is not expiring within 21 days of the requested transfer.

The registrar module has the option to make .nz domains transfer free (by overriding the price to $0.00) if the following criteria are met:

  • The domain is a .nz domain, e.g. .nz, .co.nz, .net.nz, .kiwi.nz, .org.nz, .geek.nz, .school.nz, .gen.nz, .ac.nz and so on.
  • The domain is not going to expire in the next 21 days.

To enable it:

  1. Log into your WHMCS Administration area (e.g.: http://example.com/whmcs/admin)
  2. Go to System Settings > Domain Registrars.
  3. Find the "SiteHost" registrar.
  4. Tick the checkbox for Free transfer for .NZ domain option.
  5. Click "Save Changes".

(Optional #2) Update WHMCS template

Following Optional #1, in order to make it clear to your customers that the .nz domain transfer is free for them, you might need to make some tweaks to the WHMCS order form template of your choice.

List of files to modify

  • configureproductdomain.tpl
  • viewcart.tpl
  • configuredomains.tpl

Email Templates

On WHMCS, we go to System Settings > Email Templates, and on Domain Messages choose Domain Transfer Initiated, we can add a condition like this to hide the registration length if the price is $0.00:

Domain: {$domain_name}
{if $domain_first_payment_amount != '$0.00 NZD'}
Registration Length: {$domain_reg_period}
{else}
Registration Length: ---
{/if}
Transfer Price: {$domain_first_payment_amount}
Renewal Price: {$domain_recurring_amount}
Next Due Date: {$domain_next_due_date}

The registrar-plugin will update the "Order Confirmation" email accordingly.