PUQ Mautic

Support by Time WHMCS module

WHMCS module that adds time-based paid technical support. Sell support as a product with a monthly hour package and per-currency hourly rate for overage. Operators log time directly from ticket pages, the module tracks usage and history, and WHMCS billable items are generated automatically every month. Supports both cyclic and One Time billing cycles.

Description

Support by Time module WHMCS

Order now | Download | Community

Support by Time WHMCS module

The Support by Time WHMCS module turns your WHMCS into a fully automated platform for selling paid technical support measured in hours. It lets you sell a recurring support plan that includes a fixed amount of hours per month, with an automatically calculated hourly rate for time used outside the package — or a one-time bucket of hours that the service consumes until it auto-terminates.

Operators log time directly from the ticket page — manually or with a built-in start/stop timer — the module aggregates totals per ticket, per service and per month, keeps a full audit trail of who logged what, and WHMCS billable items are created automatically by the daily cron.


Main features


System requirements & compatibility

The module supports PHP 7.4, 8.1 and 8.2+, shipped as a separate ionCube build per PHP version. Download the build that matches the PHP version your WHMCS runs on.

WHMCS version PHP version Module build
WHMCS 8.x 7.4 php74
WHMCS 8.x 8.1 php81
WHMCS 8.x 8.2 php82
WHMCS 9.x 8.2 php82


Screenshots

Client area — home screen

Client area home screen

Client area — usage history

Client area history and usage chart

Admin area — service page

Admin area service page

Admin area — ticket time form

Ticket time-logging form

Changelog

Support by Time module WHMCS

Order now | Download | Community

v3.0 (2026-06-04)

Note: No manual reconfiguration is required after updating to v3.0 — settings are migrated automatically on first read. Re-saving the product through the new form is recommended but not mandatory.


v2.1 (2025-09-20)


v2.0 (2024-09-23)


v1.3 (2023-10-19)


v1.2.5 (2023-10-11)


v1.2 (2023-08-02)


v1.1 (2023-03-21)


v1.0 (2022-10-01)

Installation and Configuration Guide

Step-by-step instructions for installing and configuring the Support by Time WHMCS module: WHMCS deployment, product creation, hour package and per-currency hourly rate setup.

Installation and Configuration Guide

WHMCS setup (install/update)

Support by Time module WHMCS

Order now | Download | Community

System requirements & compatibility

The module supports PHP 7.4, 8.1 and 8.2+ and is published as a separate ionCube build per PHP version. Download the build that matches the PHP version your WHMCS server actually runs on.

WHMCS version PHP version Module build to download
WHMCS 8.x PHP 7.4 php74
WHMCS 8.x PHP 8.1 php81
WHMCS 8.x PHP 8.2 php82
WHMCS 9.x PHP 8.2 php82

Note: The module uses ionCube encoding. Make sure the ionCube Loader for your PHP version is installed and active on your server.


Download

The module can be ordered and downloaded from PUQ Cloud:

# PHP 7.4 (WHMCS 8 on PHP 7.4)
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Support-by-time/php74/PUQ_WHMCS-Support-by-time-latest.zip

# PHP 8.1 (WHMCS 8 on PHP 8.1)
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Support-by-time/php81/PUQ_WHMCS-Support-by-time-latest.zip

# PHP 8.2 and newer (WHMCS 8 on PHP 8.2, or WHMCS 9) — use php82
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Support-by-time/php82/PUQ_WHMCS-Support-by-time-latest.zip

Which build? Match the build to your server's PHP version, not to WHMCS: PHP 7.4 → php74, PHP 8.1 → php81, PHP 8.2 or newer → php82.

After downloading, extract the archive:

unzip PUQ_WHMCS-Support-by-time-latest.zip

Installation

Step 1: Upload files

Extract the module archive and copy the puqSupportByTime directory to the WHMCS servers module directory:

WHMCS_WEB_DIR/modules/servers/puqSupportByTime

Step 2: Create product

Navigate to System SettingsProducts/ServicesCreate a New Product:

  1. Select the PUQ Support by Time module in the Module settings section
  2. Configure the product parameters (see Product Configuration)

The Support by Time module is a server module without a server: no server entry is required in WHMCS System Settings → Servers — the module does not connect to any external system.


Update

Step 1: Backup

Before updating, it is recommended to back up:

Step 2: Upload new files

Download and extract the new version, then overwrite all files in:

WHMCS_WEB_DIR/modules/servers/puqSupportByTime/

Step 3: Verification

  1. Log in to the WHMCS admin panel
  2. Verify the home screen has no license warnings for your products
  3. Open one of your support products and verify all configuration values are still set

Important (v3.0): The product configuration form was redesigned. After updating to v3.0, open every Support by Time product and re-save its settings to migrate existing values into the new structured storage format.

Installation and Configuration Guide

Product Configuration

Support by Time module WHMCS

Order now | Download | Community

Add a new product to WHMCS

Navigate to System SettingsProducts/ServicesCreate a New Product.

In the Module Settings tab select the PUQ Support by Time module (leave Server Group as None — this is a server module without a server). Two billing modes are supported, selected by the product's WHMCS billing cycle:

Module settings — full product configuration


Configuration parameters

All settings live in the Module Settings tab. Saving the product persists them as a single JSON document in tblproducts.configoption24 (the license key stays in configoption1).

Parameter Description
License key A pre-purchased license key for the PUQ Support by Time module. The license must be active for correct operation. After saving, the verification status (and the period it is valid until) is displayed below the field.
Hours per month Number of support hours included in the package. For One Time billing cycles this is the total bucket of hours.
Invoice action How the billable item for overage hours is generated at month-end: Invoice on Next Cron Run, Add to User's Next Invoice, or Do not invoice.
Invoice item name Description prefix used for billable items (default: Support). The final description is composed as <name> #<ticket> <YYYY-MM> <hours> Hour(s) (<currency> <rate>/Hour).
Show work log to client When ON, the client sees the operator name and the per-entry note for each ticket in their service-page ticket list. Date and time spent are always shown regardless of this setting.
Price per hour outside the package Hourly rate charged for time exceeding the package allocation, configured per WHMCS currency.
Notify thresholds (% of package) Comma-separated percentages (e.g. 80,100). When a client's monthly usage reaches a threshold, the email template below is sent — once per threshold per month. Empty disables notifications.
Notification email template WHMCS Product/Service email template used for usage alerts. Available custom variables: $puq_used_hours, $puq_package_hours, $puq_used_percentage, $puq_threshold, $puq_hours_left, $puq_used_hours_outside_package, $puq_price_per_hour, $puq_currency_prefix, $puq_currency_suffix, $puq_how_much_pay.

Support package

Support package settings

Price per hour (per currency)

Per-currency pricing

Usage notifications

Usage notification settings


How billing works

Recurring billing cycle

  1. During the month, operators log time on tickets through the Save time / Close ticket and save time form (or the live timer) in the ticket header. Each save is stored as a separate entry, and the parent ticket record snapshots package_hours and price_hour the first time it is touched.
  2. The first daily cron of the next month scans all support services that have unbilled tickets for the previous month. The package-hour pool is allocated across that service's tickets (oldest first); for every ticket whose hours exceed the remaining pool, one billable item per ticket is created for the overage: overage_hours × price_hour. The invoice action chosen in the product configuration determines how the billable item appears.
  3. Tickets fully covered by the package allocation are flagged as processed (billableid = 0) and no billable item is created for them.

One Time billing cycle

  1. Operators log time the same way; each entry deducts hours from the bucket.
  2. After the cron run, services that have used 100 % of their hours are automatically terminated through ModuleTerminate, and their tickets/entries are flagged so no further billing is attempted.

Important notes

Warning: This module is a server module (Products/Services). It cannot be used as an addon. Attempting to use it as an addon will return an error.

License gate: Every entry point (Create / Suspend / Unsuspend / Change Package / Terminate, ticket header, configuration page) verifies the license. If license.puqcloud.com is unreachable and the offline cache has expired, module actions fail until connectivity is restored.

Configuration storage: Starting with v3.0 the entire product configuration (hours, invoice action, item name, work-log visibility, per-currency rates, notification settings) is stored as a JSON document in tblproducts.configoption24. Existing v2.x installations are migrated automatically — legacy values stored in the old configoption3 (package settings) and configoption4 (per-currency price) slots are read transparently when configoption24 is empty, so no manual reconfiguration is needed. Re-saving the product through the v3.0 form is recommended (it consolidates everything into configoption24) but not required.

Client Area

Overview of the client-facing features of the Support by Time WHMCS module: home screen with the current month's hour usage and overage cost, and the per-month history view.

Client Area

Home screen

Support by Time module WHMCS

Order now | Download | Community

Client area home screen

After logging in to the client area and opening their support service, the customer sees a modern card-based layout with the following sections.

Client home screen

This month / Support package

A summary of the current period as three stat cards:

A progress bar shows the percentage of the allocation that has been consumed (it turns amber as the package fills and red at 100 %).

Billing (recurring billing cycle only)

Cost calculator

An interactive predictor: the client enters a number of additional hours and instantly sees the estimated total for the month, with the underlying overage hours × rate calculation shown beneath it.

List of tickets

A table with all tickets that have time logged in the current period:

Each ticket row can be expanded to reveal its individual time entries (date, time, operator, note):

Expanded ticket time entries

Sidebar navigation

The client area sidebar contains two menu items:

Note: For One Time services, only the Information tab is shown — there is no per-month history because the service uses a single bucket of hours.

Client Area

History

Support by Time module WHMCS

Order now | Download | Community

Client area history

The History tab is available in the sidebar for support services with a recurring billing cycle. It shows a per-month archive of all tickets that consumed hours, together with a 12-month usage chart.

Client history tab and usage chart

Month navigator

A row of buttons lists every past month for which time has been logged. Clicking a month switches the view to that period (loaded via AJAX); the currently selected month is highlighted.

Usage trend chart

A Last 12 months chart (Google ComboChart) plots Hours used as bars against the Package allocation as a dashed line. Bars are coloured by status so months with overage stand out at a glance.

Monthly summary

For the selected month the summary panel shows the package allocation, hours used, hours left, the overage rate, overage hours and the overage cost — all using the package size and hourly rate that were active when the time was logged.

Why a snapshot? Each ticket stores the package size and hourly rate that were active when the time was logged, so the history view always reflects what the customer was actually charged — even if the product configuration changes later.

Tickets table

For every ticket logged in the selected month the table shows the ticket number and title, total time spent, the most-recent date, a status badge, and — when an overage billable item exists — a direct link to the WHMCS invoice that contains it. As on the home screen, the operator and note are shown when Show work log to client is enabled, and each row can be expanded to its individual entries.

Admin Area

Administrative features available in the WHMCS admin panel: per-service summary and history on the product page, and the time-logging header injected into every ticket.

Admin Area

Product Home Screen

Support by Time module WHMCS

Order now | Download | Community

Admin area service page

When the administrator opens a customer's Support by Time service in WHMCS, the module adds the following panels to the service page.

Admin service page — summary, operator report, history and tickets

License verification

If the license is invalid or unreachable, a red bar with the error message is shown. While the license is invalid, the module's lifecycle hooks (Create / Suspend / Unsuspend / Change Package / Terminate) all return errors.

Summary

A one-row summary table for the current month: month, package hours, used hours, hours left, price per hour, hours outside the package, and the calculated overage amount.

Operator report

Two side-by-side tables — This month and Last month — listing each operator who logged time on this service with their total hours and number of entries.

History (recurring billing cycle)

A row of buttons that switches the List of tickets table to any past month for which time has been logged. The current month is the default. Clicking a button reloads the list via AJAX without leaving the WHMCS service page.

List of tickets

One row per ticket logged in the selected month:

Column Description
Ticket Ticket number and title (links to the support ticket)
Total Total time logged on the ticket, plus the number of entries
Operator The operator(s) who logged time
Date Date of the most recent entry
Billable Item Link to the WHMCS billable item created for this ticket (if any)
Invoice Link to the invoice that contains the billable item
Status Open / Billed / Paid / Unpaid

Expanding a ticket row reveals its time entries (date, time, note, operator) — each with Edit and Delete actions — followed by the per-ticket audit trail. Entries belonging to a ticket that has already been billed are locked (shown with a lock icon instead of the Edit/Delete buttons) so billed time cannot be altered.

Before any time has been logged for the selected month, the tickets list shows an empty state. The panels sit on the WHMCS service page below the standard product/billing fields:

Service page with no tickets logged yet

One Time services

For services with the One Time billing cycle the panel is simplified: a single Status block with package / used / left hours, and a list of all tickets that have consumed hours from the bucket.


Floating active-timers widget

On every admin page the module shows a small floating widget in the bottom-right corner listing all timers the current operator has running, each with a live elapsed clock and a link to the ticket. It polls in the background and ticks every second, so a running timer is never lost when navigating away from the ticket.

Floating active timers widget


License alert on the admin homepage

The module also adds an alert to the WHMCS admin Home page that lists every Support by Time product whose license is currently invalid or unreachable. Each entry links directly to the corresponding product configuration page so the operator can fix it in one click.

Admin Area

Ticket header

Support by Time module WHMCS

Order now | Download | Community

Time-logging header

Whenever an administrator opens a ticket in the WHMCS admin area, the module injects a context-aware header above the ticket. The header loads its state over AJAX and renders entirely client-side — every action (save, close, reopen, timer, order) happens without reloading the page. It detects the situation (active service, terminated service, no service, ticket charged in a previous month, ticket closed, license issue) and renders the appropriate UI.


Open ticket — time form

Open ticket time form

The default view is a panel containing:

Each save adds a new entry to the ticket — it does not overwrite previous entries. The running total ("Already logged") and the full breakdown are shown in the audit trail.

Audit trail

Below the form, a timeline lists every action taken on the ticket (time logged, edited, deleted, timer start/stop/cancel, service ordered), with the operator name and a relative timestamp.

Time form with audit trail


Live timer

Pressing Start opens a red Timer running panel with a server-anchored running clock and Stop / Cancel buttons. Stop rounds the elapsed time up to the nearest minute and appends it as a regular time entry (with the note, if any); Cancel discards it.

Timer running

After stopping, the action is recorded in the audit trail (elapsed time, added hours, new total):

Audit trail after stopping the timer


Closed ticket

Closed ticket

When the ticket is closed, the header shows a compact summary (logged time + service) plus a ReOpen button that switches the WHMCS ticket status back to Open so the operator can log more time. If the ticket has already been billed, ReOpen is refused (the time is locked).


Ticket charged in a previous month

Ticket charged in a previous month

If the ticket's time belongs to a previous month, editing is locked: the header shows a red panel with the recorded time, the service, and a hint to recreate or split the ticket if more time needs to be logged. This prevents retroactive changes after the monthly billable item has been created.


Service is terminated

If the service the ticket is attached to has been terminated, time editing is also locked and the operator is asked to recreate or split the ticket against an active service.


Client without a support service

Order service inline

If the client does not yet have an Active or Suspended Support by Time service, the header shows an inline order form: a drop-down with all available Support by Time products and a drop-down with available WHMCS payment methods. Submitting it creates a WHMCS order, accepts it, runs auto-setup and reloads the ticket.


License issue

When any of the customer's Support by Time products has an invalid or unreachable license, the header shows a red banner instead of the time form, with the product name and the error message returned by the license server.