Particular aspects of Charges in different currencies
An ordered Subscription uses prices fixed in the Plan currency (see Plan Information). This currency may differ from the Reseller currency (see Creating a Reseller) used for charging the Account (end-customer Charges) and the currency of the upstream Reseller used for charging the downstream Reseller (Reseller Charges).
Generating Charges using currency rates is performed as follows:
Generating end-customer Charges
- For ordering a Subscription, upgrading Resources, switching a Plan, renewing a Subscription, and consumption statistics (for the Pay as you go Billing type), the platform checks the Plan and Reseller currencies:
If the Plan and Reseller currencies do not match, Charges are generated as follows:
Charge Amount = Duration * Quantity * (Price / Currency Unit) * Currency Rate
where:
- Charge Amount — amount of an end-customer Charge.
- Duration — period of using the Resource.
- Quantity — amount of the used Resource.
- Price — price of the Resource.
- Currency Rate — currency rate from the Reseller currency to the Plan currency specified on the root Reseller level or redefined on the Reseller level (the Exchange rate field, see Currency Rates).
Currency Unit — number of currency units used for the currency rate (the Unit field, see Currency Rates).
- If the Plan and Reseller currencies match, Charges are generated using the currency rates equal to 1.
For calculating the Account balance (Current debt within the Postpay model), Charge amounts in the Reseller currency are used.
For splitting blocked Charges (for example, for downgrading Resources), the refund is performed regardless of the actual current rates.
Generating Reseller Charges
For Reseller Charges, when the corresponding end-customer Charges are closed, the platform checks the Plan and upstream Reseller currencies:
If the Plan and upstream Reseller currencies do not match, Charges are generated as follows:
Reseller Charge Amount = Duration * Quantity * (Price / Currency Unit) * Currency Rate
where:
- Reseller Charge Amount — amount of a Reseller Charge.
- Duration — period of using the Resource.
- Quantity — amount of the used Resource.
- Price — price of the Resource.
- Currency Rate — currency rate from the Reseller currency to the Plan currency specified on the root Reseller level or redefined on the Reseller level (the Exchange rate field, see Currency Rates).
Currency Unit — number of currency units used for the currency rate (the Unit field, see Currency Rates).
- If the Plan and upstream Reseller currencies match, Charges are generated using the currency rates equal to 1.
The API service allows getting detailed information about Charges generated with currency rates (see Charges (v1) and Charges):
- Original amount of Charge in the Plan currency.
- Code of the Plan Currency.
- Currency rate used for generating a Charge.
- Currency units used for generating a Charge.
Recalculating Charges when the currency rate is changed
Every night, before changing the status of Charges, the billing process checks whether the currency rate is changed for the Reseller and Plan. If the currency rate is changed, the amount is recalculated for Charges in the following statuses:
- New — except for Subscriptions linked to the Orders in the Waiting for payment, Provisioning, or Provisioning failed statuses.
- Open.
- Blocked — only for postpaid Subscriptions with any Billing type but Pay as you go.
If the currency rate is changed on the last day of a Billing period, for postpaid Subscriptions, on the next day, the amount is recalculated for Charges in the New, Open, Blocked statuses that were created on the previous Billing period.
When the Charge amount is recalculated, the used currency unit and currency rate are also updated in the Charge.