VK Cloud logo

billing sectionBeta

The billing section in the service configuration JSON file contains the following information:

  • The cost of the tariff plan.

  • The duration of the billing period.

  • The frequency at which Marketplace requests usage reports from the broker.

  • The procedure for handling unused bonuses.

  • The step increment for tariff options of the integer type.

  • The cost of the plan's tariff options. The following types of paid tariff options are supported:

    • Numeric (integer, number). Both prepaid and postpaid billing are supported.
    • Boolean (boolean). Prepaid billing is supported.

For more information about billing types, see the Billing section.

The billing type applied depends on where the tariff options are described in the schemas section:

  • If the options are described in the service_instance.create and service_instance.update sections, prepaid billing is applied.
  • If the options are described in the service_instance.resource_usages section, postpaid billing is applied.

The billing section has the following structure:

"billing": {            "cost": <COST>,            "billing_cycle_flat": <BILLING_PERIOD>,            "billing_cycle_step": <CHECK_FREQUENCY>,            "refundable": <REFUNDABLE>,            "options": {              "<OPTION_NAME>": {                <BILLING_OPTIONS>                },              ...              }            }

Here:

  • <COST> — the cost of the plan for the billing period, excluding paid tariff options. It is set in the currency of the country where Marketplace is deployed. If the plan is free, the value 0 is specified. Only prepaid billing is supported.

  • (Optional) <BILLING_PERIOD> — the duration of the billing period. It can be set only for a prepaid tariff plan.

    It is set in the format: <NUMBER_OF_MONTHS> mons <NUMBER_OF_DAYS> days. For example, 1 mons 15 days or 30 days. The number of days in a month mons is calculated according to the calendar, so the periods 1 mons 0 days and 0 mons 31 days are not equal to each other.

  • (Optional) <CHECK_FREQUENCY> — the duration of the period at which Marketplace checks whether the broker has unprocessed reports. For more information, see the Billing section. It can be set only for a tariff plan with postpaid tariff options.

    It is set in the format: <NUMBER_OF_MONTHS> mons <NUMBER_OF_DAYS> days. For example, 1 mons 15 days or 30 days. The number of days in a month mons is calculated according to the calendar, so the periods 1 mons 0 days and 0 mons 31 days are not equal to each other.

  • (Optional) <REFUNDABLE> — whether or not to refund the project's bonus account with the funds for the remaining days of the billing period if the user changed the tariff plan or deleted the service instance. It can be specified only for a prepaid tariff plan. The default value is true.

    This parameter affects the date of charging for the service when the user changes the tariff plan (edits tariff options or switches to a new one):

    • true — the date does not change.
    • false — the date is updated to the date of the tariff plan change.
  • (Optional) The options section describes the cost of paid tariff options.

    • <OPTION_NAME> — the name of the tariff option in the service configuration JSON file.
    • <BILLING_OPTIONS> — the cost of the tariff option and the step increment parameters for an option of the integer type. The tariff option itself (type, value settings) is described in the schemas section.

The parameters of the <BILLING_OPTIONS> section depend on the option type:

Name

Description

Format

Required

Prepaid option of the integer type with a step increment

base

Defines the default value of the tariff option included in the cost of the tariff plan.

The default value is the minimum value that a user can set.

If the parameter is not set, the default value is 0

integer

billing section

cost

Defines the cost of the step by which the value of the tariff option can be changed. If 0 is specified, the option change is free of charge

float64, >= 0

billing section

unit

Defines the parameters of the option step increment

billing section

billing section

Parameters of the unit section

unit.size

Defines the size of the step by which the value of the tariff option can be changed

integer, > 0

billing section

unit.measurement

Defines the units of measurement for the step specified in the unit.size parameter

string, up to 255 characters

billing section

Prepaid boolean toggle option

cost

Defines the cost of the option

float64, >= 0

billing section

Postpaid option of the integer or number type

cost

Defines the cost of one unit of the tariff option.

float64, >= 0

billing section

unit

Defines the parameters of the option step increment

billing section

billing section

Parameters of the unit section

unit.size

Defines the size of the option step increment. The value must be equal to 1

integer

billing section

unit.measurement

Defines the units of measurement of the option

string, up to 255 characters

billing section

Examples of the billing section description

Was this article helpful?