BILLmanager 6 Startup, Advanced

Billing Cycle

A billing cycle in BILLmanager is a period between one invoicing period and the next.

Every day the billdaily cron job collects information about activated services and performs the following operations:  

  • Calculates for how many days a service should be renewed. 
  • Starts automatic renewal process. 
  • Sends notifications to inform a client that his service should be renewed. 
  • Collects service usage statistics. 
  • Calculates service overdue period. 

BILLmanager allows setting up different billing cycles: monthly, daily, and hourly. 

Monthly cycle

There are two types of monthly charges: periodic and calendar. 

Periodic charges 

A client is charged periodically during the whole period. He selects a payment period when ordering a service. A charge day is always the service order date. 

Example: a client orders Shared hosting on June 5, and pays for 3 months. The system will charge him on the 5th of every month: September 5, December 5, etc. 

Calendar charges

To enable calendar charges, navigate to tariff edit form and select the Calendar-based charges checkbox. The service renewal date will be adjusted to the 1st of every month.  Also, specify the Pro-rata day. If a service is ordered before this date, it will be active until the end of the current month. If the service was ordered on the pro-rata day or later, it will be active till the end of the next month.

Example: the provider checks the Calendar-based charges box, the Pro-rata day — 15. Therefore, if a client orders a service on July 12, it will be active until August 1. If he orders the service on July 17, it will be active till September 1. 

In the case of calendar charges, an incomplete month will be calculated as follows: (number of days in the month - current date + 1) / number of days in the month * tariff price. The client will be charged a full price of the tariff plan for the whole month. 

  • If the client orders a monthly service before the pro-rate day, he will be charged for the incomplete month (see the formula above). 
  • If the client orders a monthly service after the pro-rate day, he will be charged for both the incomplete month (see the formula above) and the full month. 

If he orders a service for longer periods, for example for 3 months: 

  • If the client makes an order before the pro-rate day, he will be charged for both two full months and the incomplete month.
  • If the client makes an order after the pro-rate day,  he will be charged for both the whole period (3 full months) and the incomplete month. 

Daily cycle

Note
Features of the daily payment cycle:
●     For daily withdrawal services with an ordering period of a month or more, the service is stopped at 00:00 hours of each day, regardless of the time of purchase.
●     Services with daily billing run as long as there are funds in the client's account.
●     The amount of the daily payment depends on the period of the service order.

Services with daily billing remain active as long as there are funds in the client's account. 

To activate daily withdrawal:

  1. Enter ProductsProduct types → select a product → click Edit.
    1. In the Order periods section, enable the Day option.
    2. Select a Payment cycle scheme:
      • General withdrawal scheme — renewal of services will follow the standard withdrawal scheme of once a day. By default, the task for service renewals is started at 00:15 of each day;
      • Full day — service renewal will not occur until the time of service validity. By default, the task to renew expiring services is launched every 30 minutes;
      • Full Day (to the nearest hour) — service renewal will not occur until the hour of service validity. By default, the task to renew expiring services is launched every 30 minutes.

        Example
  2. Enter ProductsTariffs → select a tariff → click Edit.
    1. Enable the Charge daily option. When the option is enabled, funds for the use of the service are withdrawn from the client's account on a daily basis.
      With the Charge daily option enabled, the following will be available:
      • Calculate daily cost depending on order period — enable the option so that the amount of payment at daily withdrawal does not depend on the number of days in a month. The cost per day will be calculated based on the number of days in the order period;
      • Allow clients to resume/suspend services — enable the option to give the client permissions to start and stop tariff services.
        If the Charge client in case of service suspension option is:
        • enabled — downtime is paid for by the client. The option is enabled by default;
        • disabled — at the beginning of the next day the client will be refunded for the downtime of the service. In this way, the client can influence the daily cost of the service.

Examples

The cost of the service with daily withdrawal is calculated according to the formula:

(cost of the ordered period / number of months in the period) / number of days in the current month

For example, on March 1, a client ordered a virtual server for 100 euro per month with daily withdrawal. The order period is three months. The total cost of the order is 300 euro. In March, every day the client will be charged 3.23 euro (300/3/31). In April, 3.33 euro (300/3/30) will be withdrawn daily.

The cost of the service with daily withdrawal when the Calculate the cost per day from the order period option is enabled is calculated according to the formula:

cost of the order period / amount of days in the period

For example, on March 1, a client ordered a virtual server for 100 euro per month with daily withdrawal. The order period is three months. The total cost of the order period is 300 euro. There are 92 days in the period. The client will be charged 3.26 euro (300/92) daily until May 31. On June 1st, a new period will begin.

Difference between daily charges and charges for the "day" period

In both cases, the cost per day is deducted, but:

  • with daily billing, the service is ordered for a certain period and the cost of one day is calculated from the cost of this period. For example, a client orders VDS for 1 month for 100 EUR, then every day he will be charged: 100 / number of days in this month;
  • with a period of one day, the cost of one day is specified specifically. For example, a client buys VDS for 1 EUR a day. In this case, 1 EUR will be debited every day.

Additionally

A task in the cron scheduler is responsible for daily renewal of services that have the "Full day" or "Full day (to the nearest hour)" options enabled in the product type settings for the Payment cycle:

*/30 * * * * /usr/local/mgr5/sbin/billmaintain --command billperiodic >/dev/null 2>&1

Hourly billing

For correct operation of hourly billing, if the Day payment period is enabled in the product type settings, we recommend to use the "General withdrawal scheme" option for the Payment cycle.

To activate hourly billing:

  1. Enter ProductsTariffs → select a tariff → click Edit.
  2. Enable the Charge daily and Allow clients to resume/suspend services  options to account for service downtime. If the Withdraw funds when stopped option is:
    • enabled — downtime is paid for by the client. The option is enabled by default;
    • disabled — at the beginning of the next day the client will be refunded for the downtime of the service. In this way, the client can influence the daily cost of the service.

The cost of the service including downtime is calculated according to the formula:

(Cost of service + Cost of resource) / Number of hours per day * Number of hours of work + Cost of resources with withdrawals in case of downtime

Recalculation and refunds to the client are done every day by the billdaily job (cron). Recalculations and refunds are performed for services that have a stop date that is the same as the current date. As part of the cron job, the stop date for services with hourly billing is changed - extended by one day. Refund scheme:

  1. The service has been extended, at the beginning of the day the funds for the current day are withdrawn.
  2. The service was active for twelve hours, after which it was stopped.
  3. BILLmanager will start the recalculation at the beginning of the next day. The expense with the amount for the previous day will be deleted and a new expense with the amount for twelve hours will be created instead.

Example: the service provider offers Shared hosting with hourly billing. He doesn't charge his customers for downtime (the Charge client after suspension box is not checked). Service cost is 10 euro per day.

The client ordered two addons — "Disk space" for 5 euro and "Public IP address" for 10 euro. When Disk space gets suspended, the client will be charged for the service and is not charged for the IP address. 

The total service price is 25 euro a day. For the last 24 hours, Shared hosting was active only for 12 hours. So, the client will get a refund for half of the service and IP address price. The total service price will be 15 euro for the last 24 hours.  

Note:

We don't recommend that you manually recalculate services with the hourly billing cycle.

This may affect expenses with other billing cycles and the whole charging procedure.