What is Maxio Metering?
Metering is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing.
These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers.
Events
Events are actions occurring in your system that you wish to track. These actions might be triggers for the value you create for your customers. They are represented as JSON objects.
Event Examples:
- The API calls made to your app
- The logins or page views of your users
- The shipping and return orders of your business
Streams
Streams are collections of similar events. You can think of a stream as a database table, where each entry in the table is an event. Events in a stream should have similar schemas, although that is not required. Each stream has its own API endpoint where you send events to Advanced Billing in real-time as they happen in your system.
Related Articles:
- To learn more about how to architect your events and streams, check out our Event Data Modeling Guide.
- The Getting Data from Events article explains how to create streams and work with the events API.
- Send Usage to Maxio is guided walk-through on how set up the API integration to send usage data to Maxio and enable usage-based billing for your Customers.
Meters
Meters are used to measure the events in your streams and produce values for them. They can use one of the following types of analyses: count, sum, average, median, minimum, maximum, and percentile.
Some examples include:
- Count of a type of API request
- Average response time of API requests
- Sum of minutes spent on your app
Meters are how insights are extracted from events in order to track data of interest over time. A single stream can have many meters.`
The “Getting Data In” guide contains a section on Creating Meters.
Billing for Events
Once you have streamed events and defined one or more meters, you can bill for them! For this, you must create a Metered Usage component.
Metered Usage components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the Metered Usage component is that it must be attached to a meter. This is because the meter provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription.
So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events.
This article on Metering shows you how to set up the components and configure your billing on events.
Analyzing Event Data
You are not required to bill for your events. You may choose to just send all of your events to Advanced Billing for analysis and insights. You may even find that you want to change from billing on one event meter to another event meter entirely. When all of your event data lives in Advanced Billing, changes like that become easy.
You can analyze your events using the graphs provided on the Meters screen.
Glossary
An Event is an action or occurrence that happens in your system that is represented as JSON data objects and reported to Advanced Billing.
A Stream is a collection of similar events, usually with a similar schema.
A Meter is a computation (e.g. count, sum, or average) from a stream of events to produce a numeric value which measures event data you are interested in. Usually, meters are plotted or observed over different time frames and intervals to extract insights.
A Data Store is a collection of event streams analagous to a database. Advanced Billing gives you a data store automatically when Metering is enabled, but you can attach other data stores from supported partners.