Skip to main content
Home

Blog

Build a Usage-Based Pricing Model from Your Product Database with Maxio + Airbyte

SaaS and IoT companies have traditionally designed their pricing strategy with one goal in mind: gain a predictable and recurring stream of revenue.

Team Maxio image

Team Maxio

January 21, 2022

SaaS and IoT companies have traditionally designed their pricing strategy with one goal in mind: gain a predictable and recurring stream of revenue. Generally, this takes the form of a base plan with a flat fee or per seat pricing. These plans typically include a bundle of features and functionality which also act as a motivator to move users into a higher tier.

While the predictability and upsell opportunity of this pricing model is great for your organization, it may not provide an optimal experience for your end user. With this model, customers are often charged for functionality that they don’t need and end up having to pay for a premium plan just to access a subset of functionality. This can result in a lower NPS, higher churn, and stunted growth.

In 2017, SaaS companies began evaluating different pricing models that can deliver a better customer experience. Enter, usage-based pricing. Usage-based pricing connects the value your product delivers to the invoice the customer receives. Customers have the opportunity to pay for exactly what they need and nothing more. 

Historically, companies have been reluctant to adopt usage-based pricing because it seems counterintuitive to the goal of predictable and recurring revenue. But, the data tells a different story. The fastest-growing SaaS companies in 2021 are especially likely to leverage usage-based pricing, and their competitors are quickly following. Usage-based pricing has seen a 2x increase in adoption over the last 4 years, and it’s expected to become the leading pricing model used by SaaS companies in 2023, according to OpenView.

In this tutorial, we’ll show you how to connect the product data in your data warehouse with Maxio to create a multi-attribute, usage-based pricing model. Multi-attribute, usage-based pricing is an advanced form of usage-based pricing that uses 2 or more attributes to determine the cost of a unit. (think: Snowflake, Datadog, AWS, or Airbyte). This will allow you to truly connect your product’s value to your customers’ bill, improving customer experience and reducing churn.

Airbyte-image-1

‍Pre-requisites

Start by identifying a method to move your data. We offer a number of methods to stream data including via API or Kafka Connector. For this example, we’ll be using Airbyte because many users find it the lowest barrier to entry. To deploy Airbyte, follow the simple instructions in their documentation here

For this example, we’ll use MongoDB as the database where we are storing our product usage data. MongoDB and Maxio are SaaS services, and you’ll need to have an account on each of these platforms to get started. 

You’ll need to request your API credentials for the Maxio Destination by contacting support@chargify.com.

‍Step 1: Set up the Maxio Destination in Airbyte

Start by visiting http://localhost:8000.

If this is your first time launching Airbyte, you’ll need to customize your preferences. Then, you’ll be offered a quick onboarding for the application. You can complete the walkthrough or skip it and continue with the following steps.

Navigate to the Destinations tab and create a new Maxio Destination Connector.

Airbyte-image-2

Now, it’s time to set up your connector.

hargify’s Events-Based Billing is powered by Keen.io/Stream, a data streaming and analytics platform. You will need Keen API credentials to set up the Maxio destination connector in Airbyte. Please contact support@chargify.com or your Customer Success Manager to acquire the Project ID and Master API Key that correspond to your Maxio site.

After obtaining your API keys, plug them into the Maxio destination connector and select ‘Set up destination’.

That’s it! Now, you’re ready to connect Maxio with the source of your choice.

Note: By default, the Maxio connector will infer the chargify.timestamp field based on the data from the event that occurred in the source application. This ensures the most accurate analytics for time-related data. If the connector cannot infer the timestamp, or if you choose to disable this functionality, chargify.timestamp will hold the value of time when the record was saved in Maxio. 

Step 2: Set up the MongoDB Source in Airbyte

For this tutorial, we have chosen to use MongoDB as the example database where a company stores their events-based product data. Our example company for this demo is a cloud data warehouse that wants to bill on attributes of data transferred.

The Maxio destination can connect with any data warehouse that has an Airbyte.io connector for Events-Based Billing.

After the Maxio destination connector is set up, you’re ready to create a MongoDB source in Airbyte.

Navigate to your Airbyte.io instance and create a new source by following the steps below:

  1. From the list of available connectors, choose MongoDB. 

  2. Fill in the Database Name. 

  3. If needed, provide the authentication fields. Airbyte advises to create a user with read-only privileges for the integration. You can follow the steps described in the

  4. Complete the details related to your database instance; you can choose from a Standalone MongoDB instance, replica set, or the MongoDB Atlas. 

For the scope of this tutorial, we’re using a standalone MongoDB instance running in a docker container on a local machine. For testing purposes, you can use this approach by simply running

docker run --name some-mongo -p 127.0.0.1:27017:27017/tcp --env MONGO_INITDB_ROOT_USERNAME=admin --env MONGO_INITDB_ROOT_PASSWORD=example -d mongo

Step 3: Create an Airbyte Connection from MongoDB to Maxio

Now, you can connect the Maxio Destination with the newly created MongoDB source by executing the following steps: 

1. Choose your desired synchronization frequency and which streams you want to replicate to Maxio.

For our cloud data warehouse example, we’ll choose airbyte_azure_data_transfers stream. An example event of our Azure Data Transfer stream that illustrates the properties is shown below.

Example Event:

{ "destination_provider": "azure", "storage_region": "East US 2 (Virginia)", "size_mb": 12142512, "client_id": "070fcd32e1c644e898acd78328986e31", "destination_same_continent": false, "_id": "616e9dcf9afd13b97bda8d05", "destination_same_region": false, "chargify": { "timestamp": "2021-10-19T10:41:00.665Z", "created_at": "2021-10-19T10:41:11.139Z", "id": "7df43be1ae29515342fbf6d948325a00" }

The Maxio destination supports 3 synchronization modes. You can specify the mode for each stream:

  • Full Refresh – Overwrite: This mode replaces all the old data in Maxio collection

  • Full Refresh – Append: This mode fetches all the data from source every time and appends it to an existing collection

  • Incremental Sync – Append: This mode adds only new, or modified records for each synchronization. During the first run, it works the same as a Full Refresh, but for each next run, only records that were not present before will be fetched

Not all streams support all synchronization modes.

For more information regarding connection settings, check the connections and sync modes documentation.

2. Set up the connection and launch the first synchronization.

Airbyte-image-3

Head to Maxio site and select Events, then Streams from the left side panel. You should see the message stating that you have some unattached streams from Keen.

Click there and choose the desired stream. 

Change the subscription identifier to one matching your subscription reference in your streamed data. In our example dataset, this information is stored in customer_id property. 

After attaching the stream you should be presented with events that were replicated by the Airbyte connector.

unnamed

Step 4: Create an Events Based Billing Component

Once you’ve connected your product data to Maxio you’ll see an Event Stream appear in the Streams tab. Event Streams are the container for the data that is sent over from the Airbyte stream you just set up. For our example, it’s the ‘azure-data-transfer’ data.

Metrics perform analysis on your Event Stream and are the foundation for Events-Based Billing. They’re used for computing the amount of something that was used or consumed in a service. In our example the metric will be summing the total data transferred in megabytes. 

Metrics can be broken down into segments of dataFor example, in this recipe, we will segment our data transfer by: storage region, destination provider, destination continent, and destination region. These segments can then be used to create a rating model. This allows you to set a price (or rate) for the different combinations of each of these segments as shown in the example below.

Airbyte-image-9

For this tutorial, we’ll choose the sum analysis type, size_mb as a target property and specify four segments: storage_regiondestination_provider, destination_same_continent, and destination_same_region. This metric will compute the sum of size_mb streamed by each user using the specified customer_id as the subscription identifier. Metric results are rated using the selected segments.

Airbyte-image-10 (1)

Now we’re ready to create the Events Based component. 

  1. Navigate to Catalog, products and click Create Component.

     Choose the Events Based Component.

  2. Fill in the component details—name, api handle, unit name (in our case

  3.  megabytes)— and select our newly created metric as a billing metric. 

  4. Choose your desired pricing scheme. We’ll go with the most simple one:

     per unit,meaning charging the same amount per unit. We will choose $0.00001 as the default price. Now it’s time to create a rating model for different combinations of segments.

Let’s say we want to charge a different price for data that got streamed from the Japan East (Tokyo) region to the same cloud, Azure, and that the destination is on the same continent but in a different region. To achieve this, we need to create a new segment and fill in all segmented variables.

Airbyte-image-11 (1)

This is what the final configuration will look like:

Airbyte-image-12

Step 5: Start Charging Your Customers With Your Events-Based Billing Model

Now, you can activate billing for the newly created component for your client’s subscriptions. 

  1. Choose billing and subscriptions on the left hand side panel. 

  2. Select subscription and navigate to components section. 

  3. Click actions next to our new component and choose to activate billing.

Then you can preview a proforma invoice to see what the customer will be charged and what combination of attributes are driving the cost.

Airbyte-image-13

Step 6: Analyze Your Maxio Data and Data From Airbyte in Maxio

Streaming your data to Maxio gives you the ability to run custom analysis and uncover relevant insights and trends. You can also stream data from other tools in your tech stack to analyze alongside this data. Popular examples include Zendesk, Intercom, Drift, or any other Airbyte supported connector.

The Explorer is a tool in the Maxio app that enables you to perform a wide array of analysis on your data by creating, running, and managing metrics. For this example, let’s say you’re interested in getting a count of transfers executed in the current month grouped by destination provider, continent, and region.

unnamed2

To do this, you would use the following query parameters within the “QUERY” tab.

Analysis: Count Data Source: airbyte_azure_data_transfer Timeframe: Last 1 months Group by: destination_provider, destination_continent, destination_region

You can save this query to be reused. After saving, your query is ready to be added to a dashboard.

Step 7: Create a Dashboard using your Maxio and MongoDB Data

The Dashboard Creator is a drag-and-drop tool that allows you to quickly create reports and share them with relevant internal or external users.

Navigate to the dashboards tab and select ‘New Dashboard’. Then, add the chart you created by selecting the ‘Chart’ button and clicking on the name of the chart.

unnamed3

Below is an example of a Maxio Dashboard that unifies Maxio and your MongoDB data.

Airbyte-image-8

Summary

Here is what we’ve done during this tutorial: 

  1. Set up the Maxio Destination in Airbyte

  2. Set up the MongoDB Source in Airbyte

  3. Create an Airbyte Connection from MongoDB to Maxio

  4. Create an Events Based Billing Component

  5. Start charging your customers with your Events-Based Billing model

This allows companies to implement true value-based pricing, improving customer experience, reducing churn, and accelerating growth while deriving actionable insights with our powerful analytics tools, so you can make strategic business optimizations. Finally, by implementing a complete billing and subscription management system, you can fully automate your manual processes from signup to billing to revenue recognition.

Ready to implement a true, value-based billing model? Reach out to a billing expert to learn how to identify your key value metrics.

Join the newsletter

Get actionable insights from industry experts delivered to your inbox.