Documentation for the enhanced FusionPBX autobill interface, including execution methods, output behavior, and how WHMCS Automation and Prorata settings affect billing outcomes.
autobill_v3.php script has been introduced as a consolidated version that combines the functionality of autobill_v2.php with additional enhancements. Both versions are available and fully supported.
autobill_v2.php (standard enhanced version) and autobill_v3.php (consolidated version) used for FusionPBX usage billing in WHMCS environments.
Enhanced versions of the FusionPBX autobill script provide a modern browser-based UI for debugging and monitoring. Version 3 consolidates all autobill functionality into a single script.
| Feature | autobill_v2.php | autobill_v3.php |
|---|---|---|
| Purpose | Standard FusionPBX billing | Consolidated all-in-one billing |
| Modern UI | Yes | Yes, enhanced |
| Real-time Statistics | Yes | Yes |
| Progress Tracking | Yes | Yes |
| Multi-Module Support | FusionPBX only | FusionPBX + VoIP + VoIPFax |
| Consolidated Logic | No | Yes |
| Recommended For | FusionPBX-only setups | Mixed or multi-module environments |
autobill_v2.php if you only have FusionPBX server module products and prefer a dedicated script.autobill_v3.php if you have multiple server modules or want a single consolidated billing script.?runfrom=cron parameter to execute.https://yourdomain.com/modules/servers/fusionpbx/autobill_v2.php?runfrom=cron
https://yourdomain.com/modules/servers/fusionpbx/autobill_v3.php?runfrom=cron
php /path/to/fusionpbx/autobill_v2.php runfrom=cron
php /path/to/fusionpbx/autobill_v3.php runfrom=cron
TZ= parameter is required to ensure cron jobs run in the correct timezone, not UTC.
Recommended schedule:
# Run at 12:55 AM in America/Toronto timezone
55 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v2.php?runfrom=cron
# Run at 12:55 AM in America/Toronto timezone
55 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v3.php?runfrom=cron
# Alternative: More time before WHMCS daily cron
45 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v3.php?runfrom=cron
# PHP CLI format
55 00 * * * TZ=America/Toronto /usr/bin/php -q /path/to/whmcs/modules/servers/fusionpbx/autobill_v3.php runfrom=cron
| Feature | autobill.php (v1) | autobill_v2.php | autobill_v3.php |
|---|---|---|---|
| UI | Plain text | Modern styled UI | Modern styled UI |
| Real-time updates | No | Yes | Yes |
| Progress bar | No | Yes | Yes |
| Statistics dashboard | No | Yes | Enhanced |
| Icons/Emojis | No | Yes | Yes |
| Responsive layout | No | Yes | Yes |
| Time tracking | No | Yes | Yes |
| Multi-module support | FusionPBX only | FusionPBX only | FusionPBX + VoIP + VoIPFax |
| Consolidated billing | No | No | Yes |
autobill_v2.php follows WHMCS billing dates rather than inventing its own cycle. This means the service Next Due Date, WHMCS Automation Settings, and product prorata settings all influence when usage invoices are created and what date range they represent.
CreateInvoiceDaysBeforeMonthly is used first for Monthly services. If blank or 0, the script falls back to CreateInvoiceDaysBefore.autobill_v2.php selects services whose Next Due Date matches the automation target date.WHMCS product settings such as Prorata Billing, Prorata Date, and Charge Next Month affect the service billing cycle that WHMCS establishes. autobill_v2.php follows the dates WHMCS assigns to the service.
cdr_class.php can use the service Date Registered (regdate) as the start of the first usage billing period when no prior non-cancelled WHMCS Hosting invoice item exists for that service.Hosting invoice item for the service, later autobill runs use the standard rolling cycle for Monthly billing.CreateInvoiceDaysBeforeMonthly = 15 and the service Next Due Date is the 1st, autobill_v2.php creates the usage invoice on the 15th of the prior month and sets the due date to the 1st.CreateInvoiceDaysBeforeMonthly and CreateInvoiceDaysBefore are 0, the script behaves as same-day billing and only targets services due today.Next Due Date; once advanced, the same cycle should no longer be selected by autobill_v2.php.Next Due Date.autobill_v3.php introduced as a consolidated billing script supporting FusionPBX, VoIP, and VoIPFax modules.autobill_v2.php maintained and fully supported for FusionPBX-only environments.Document Last Updated: April 19, 2026
Modules: FusionPBX Autobill Enhanced (autobill_v2.php and autobill_v3.php)
Current Version: v1.4.4 Stable
Ownership: Developed and maintained by ictVoIP Canada