Skip to content
CWPControl Web PanelDocumentation

Billing automation

Updated

Once a day the billing runs its automation: it creates renewal invoices, charges saved cards, sends reminders, adds late fees, and suspends and terminates overdue services. It runs from the cron (bin/console cron) at the hour you choose.

Where to find it: Billing settings → Automation.

Billing settings with the automation days

What the daily run does, in this order

  1. Renewal invoices. It creates them for services and domains whose due date is within Create renewal invoices … days before due. Several services of one client that are due on the same day go on one invoice. The client’s account credit is applied automatically.
  2. Automatic card charge. Invoices of clients with a saved Stripe card are charged on the due date. A failed charge is retried, up to 3 attempts by default.
  3. Overdue notices. The 1st, 2nd and final notice are sent the given number of days after the due date, for example 1,3,7.
  4. Reminders before the due date and the “Service expires soon” e-mail. Both are optional.
  5. Late fees (optional). A percentage or a fixed amount, added the given number of days after the due date, with an optional minimum.
  6. Suspension and termination. Suspension happens Suspend on the server … days after due. Termination Terminate (delete account) … days after due deletes the account on the server. 0 means never. Paying the invoice unsuspends the service automatically.
  7. Stale orders. New orders that are still unpaid after the given number of days are cancelled.

The result of every run is in the audit log, and the time of the last run is on the dashboard.

Settings

SettingDefaultMeaning
Automation enabledonOff: the daily run does nothing. Use this during testing or a WHMCS migration.
Hour of the daily run0The server hour (in the time zone from the installation).
Create renewal invoices … days before due7It can be different per billing cycle (monthly, annually, …).
Overdue notices1,3,7Days after the due date.
Reminder … days before an invoice is due00 = off.
“Service expires soon” e-mail14Days before the due date. 0 = off.
Suspend … days after due30 = never.
Terminate … days after due300 = never.
Cancel unpaid new orders after … days140 = never.
Late feeoffDays, type (percent or fixed), amount, minimum.

Exceptions per service

On a service, No auto-suspend until keeps the service running until that date, for example for a client who promised to pay. Services without a server module (for example manual services) are only marked overdue.

Preview

See what the next run would do without changing anything:

php bin/console billing:preview

Common problems

ProblemCause and solution
No renewal invoices are createdThe cron is not running, or Automation enabled is off. Check the last run time on the dashboard and run php bin/console cron by hand to see errors.
The daily run happened at the wrong hourThe time zone in config/config.php (timezone) differs from what you expect. The hour uses that time zone.
A service was not suspendedIt has No auto-suspend until set, its product has no module, or the server module returned an error (see the service’s Recent API calls).
A client got two invoices for one serviceAn invoice was created by hand for the same period. Cancel one of them. The automation does not create a second renewal invoice while one is open.

Related