Pay as you go. Charges generation
This article covers the Prepay model only. For the Postpay model, see Particular aspects of charges within the Postpay charging model. See also Particular aspects of charges in different currencies.
In this article:
Pay as you go subtypes
The Pay as you go billing type has two subtypes:
- Pay as you go (external).
- Pay as you go (internal).
The difference is in where the resources net costs are stored:
- Pay as you go (external) — the resources net costs are stored on the service provider side and are requested via API to create the consumed resources records.
- Pay as you go (internal) — the resources net costs are stored in the platform and are specified during the plan creation (see Plan Resources).
Particular aspects of charges for the Pay as you go billing type
The Pay as you go billing type is used for endless subscriptions to pay only for the actual consumption of the resources. Payments for the previous month are completed on the billing day. It is possible for a user to pay with the negative account balance within the financial blocking threshold, as well as to pay using the guaranteed payment (see Creating an account class).
In the majority of cases, for the Pay as you go (external) billing type, no resources are added to a plan, and no fees are specified for the plan period. For the Pay as you go (internal) billing type, only the unit fees are specified for resources in a plan.
The charge amount calculating and changing is based on the consumed resources records (see Charges attributes).
Statistics and details of the resources usage may be available depending on a service (see Viewing the list of consumed resources for subscriptions with the Pay as you go billing type).
The actual algorithm and periodicity of retrieving the consumption data may vary for different services and also depends on a service (see ActivePlatform. Services. Operator documentation)
General rules for the Pay as you go billing type
Generation and changing of attributes of charges for the Pay as you go billing type have the following specific aspects:
When the discount, resources costs or the automatic markup rate are changed during the billing period, several charges are created for one period. The first charge is generated according to the rules described in this paragraph. The next charges are generated at the moment of the discount, resources costs or the automatic markup rate changing. At the same moment, the first charge, which is blocked, gets the Closed status.
The details about charges behavior in case of the discount, resources costs or the automatic markup rate changing during the billing period are given below.
- For the Pay as you go (external) billing type, only one charge of the subscription resource consumption type is generated for a billing period.
- For the Pay as you go (internal) billing type, one charge of the Recurring fee type is generated for every resource for a billing period.
- The charge period starts from the date of the beginning of the resource usage for the first charge, or from the billing day for the following charges, and ends at the next billing day.
- The charge has the Blocked status.
- The charge amount is changed with a periodicity set in the service settings, proportionally to the amount of the consumed resources.
- The date of the charge creation depends on the periodicity of the resources consumption data update. The charge is created after the processing of the first records about consumed resources.
- The charge close date is the nearest billing day.
Subscription ordering and resources consumption
An example of the charges for the subscription, the consumed resources records for which are generated once a day, is given below.
Let's assume that the billing day is set as the 1st day of each month.
- The subscription is ordered on 20.11.2017, but the resources are not used yet. The charges are not generated yet, because no resources were consumed.
- The resources usage starts 21.11.2017. The charges are not generated yet, because consumed resources records are generated only once per day for the previous day.
- On the 22.11.2017, the first consumed resources records are generated, and the charge No.1 is created on their basis with the following attributes:
- The charge amount is calculated as the product of the resource unit price and the number of the consumed resource units. The corresponding amount is blocked on the account balance.
- The charge period: from the date when the resources usage starts to the end date of the corresponding billing period.
- Created at: charge generation (consumed resources records creation) date.
- Close date: corresponding billing period end date.
- Status: Blocked.
- Each next 24 hours (each time the new consumed resources records were created) up to the end of the corresponding billing period:
- The charge amount is increased according to the consumed resources records.
- The amount increment is blocked on the account balance.
- At the nearest billing day (01.12.2017 in the example), the charge No. 1 is closed, and the corresponding amount is withdrawn from the account balance.
- On 02.12.2017, new consumed resources records in the next billing period are created, and the charge No. 2 is generated on their basis. Generation and changing of attributes of the charge No. 2 is similar to the generation and changing of attributes of the charge No. 1.
The same operations are repeated each next billing period.
Charges behavior when the resources costs are changed during the billing period
For the Pay as you go (internal) billing type
The resources costs are changed when one or several following parameters are changed:
Changes at the levels of all resellers are taken into account, even when some of them disabled automatic markup.
- An automatic markup for the plan (see Changing the automatic markup for existing plans).
- For the Pay as you go (internal) billing type — the net cost of the plan (see Viewing the price list).
- A discount that is applicable to the charge (see Managing discounts).
When the resources costs change during the billing period, the following occurs:
- The charge for the period, in which the old cost was applicable, gets the Closed status. The accumulated amount is withdrawn from the account balance.
- A new charge is created with the following attributes:
- Status: Blocked.
- Period start date: a date when the cost changed.
- Period end date: last day of the current billing period.
- A new charge is incremented progressively based on the consumed resources records.
- On the billing day after the end of the billing period, the second charge gets the Closed status. The accumulated amount is debited from the account balance.
For the Pay as you go (external) billing type
The resources costs are changed when one or several following parameters are changed:
Changes at the levels of all resellers are taken into account, even when some of them disabled automatic markup.
- An automatic markup for the plan (see Changing the automatic markup for existing plans).
- A discount that is applicable to the charge (see Managing discounts).
When an automatic markup for the plan is changed during a billing period, the following changes are applied:
- For subscriptions ordered at the plan prices (see Ordering a subscription at the plan prices) without the fixed price, any changes of the automatic markup in the price list section at any level cause the following changes in the subscriptions to the plan:
- The customer charge for the current billing period remains in the Blocked status.
- When new consumption statistics are received, a new customer charge is created. This charge uses the new price chain with the updated automatic markups of the plan at all levels.
- All new statistics are included in this new charge. The charge uses the updated automatic markup taking into account the automatic markups at other levels.
- For subscriptions ordered at the individual markup (see Ordering a subscription at the individual markup) without the fixed price, any changes of the automatic markup in the price list section at any upstream level or on the price list tab of the subscription ordered at the individual markup cause the following changes in the subscriptions to the plan:
- The customer charge for the current billing period remains in the Blocked status.
- When new consumption statistics are received, a new customer charge is created. This charge uses the new price chain with the updated automatic markups of the plan at the upstream levels and the current value of the individual markup.
- All new statistics are included in this new charge. The charge uses the updated automatic markup at the upstream levels and the current value of the individual markup.
- For subscriptions without the fixed price, reseller charges use their automatic markup chains that were applied to the corresponding closed customer charges.
- For subscriptions with the fixed price, when the automatic markup for the plan is changed in the price list section at any upstream level, reseller charges use the automatic markups at upstream levels that were set at the moment of ordering the subscription.
For discount changes, the behavior is similar to the Pay as you go (internal) billing type.
Subscription renewing
For the Pay as you go billing type, only endless subscriptions are ordered, so renewing is not available.
Changing the resource amount
For the Pay as you go (external) billing type, subscriptions are based on plans that do not have any resources.
For the Pay as you go (internal) billing type, changing the resource quantity is not available.
Subscription deleting
When a subscription is deleted, the charge for the current billing period changes its period and close date and gets the Closed status. The accumulated amount is withdrawn from the account balance.