This topic is about Metered usage V2. Marketplaces use the Metered usage V1 API, Metered usage V2 API, or both, to support metered usage billing. See also: Metered usage V1.
Important: Metered usage v2 is currently in Early Availability status. Features in Early Availability status are only available in production to a limited number of customers based on fit with specific use cases. For more information about Early Availability status, see Product lifecycle phases. If you would like to use the product capabilities described here during the Early Availability phase, contact your AppDirect technical representative.
There are two types of metered usage: preconfigured and custom. Both types require product configuration before you submit usage with the API (see Metered usage prerequisites). With the V2 API, if needed, you can submit both preconfigured and custom metered usage events in the same call.
When you report preconfigured usage with the API, the static unit type, price, and description of the usage that are configured for the product edition or add-on product, are applied to all usage reported for the unit type.
For the edition or add-on, you can preconfigure multiple unit types and pricing for the same product edition or add-on product. For example, you could configure both of the following types for the same product edition or add-on product:
With custom metered usage, you can charge users any price for usage, and change the price as needed. For example, when a customer subscribes to electricity services, you can charge a different price for electricity that they use during the day and night, or vary the price during a billing period based on demand. You can also describe the charge and units uniquely for each customer and billing period.
On invoices, usage events are aggregated by unique unit type, such as kilowatt, gigabyte, or user license. Each invoice line displays the following information:
the description submitted with the first usage event for the unit type in the billing period
the total quantity of all events for the unit type
the price for the aggregated usage (the number of decimals that appears on invoices is defined in the invoice template)
If the price is the same for all events of the same unit type, it appears on the aggregated invoice line as it was submitted.
If the price for events of the same unit type differ, the price that appears on the invoice line is the weighted average price by quantity.
Example: If the four usage events shown in the following table are submitted, the resulting invoice displays two invoice lines, as shown in the second table.
Date |
Custom description (optional) |
Custom price ($) |
Custom unit |
Quantity |
---|---|---|---|---|
May 1 |
Residential electricity usage |
0.10 |
kWh |
1000 |
May 2 |
Residential electricity usage |
0.20 |
kWh |
2000 |
May 2 |
Commercial electricity usage |
45.00 |
MW |
3.0 |
May 3 |
Residential electricity usage (evening hours) |
0.03 |
kWh |
500 |
Date |
Custom description (optional) |
Custom price ($) |
Custom unit |
Quantity |
---|---|---|---|---|
May 1 |
Residential electricity usage |
0.1471428571 |
kWh |
3500 |
May 2 |
Commercial electricity usage |
45.00 |
MW |
3.0 |
The description for the last submitted event (Residential electricity usage—Evening hours) does not appear on the invoice, because only the description submitted with the first event of that unit type in the billing period appears on invoices. The price per kWh for Residential electricity usage varied, so a weighted average price is displayed.