---
source_url: "https://www.scribd.com/document/891498618/Togai-is-a-Platform-Specifically-Designed-to-Make-It-Easier-for-Software-and-SaaS-Companies-to-Manage-Usage-based-Pricing-Models-These-Models-Charge"
title: "Togai: Simplifying Usage-Based Billing | PDF | Computer Science | Information Technology"
mirrored_at: 2026-08-13T15:06:46.143Z
host: www.scribd.com
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/www.scribd.com/document/891498618/Togai-is-a-Platform-Specifically-Designed-to-Make-It-Easier-for-Software-and-SaaS-Companies-to-Manage-Usage-based-Pricing-Models-These-Models-Charge"
---

> **Original source:** https://www.scribd.com/document/891498618/Togai-is-a-Platform-Specifically-Designed-to-Make-It-Easier-for-Software-and-SaaS-Companies-to-Manage-Usage-based-Pricing-Models-These-Models-Charge

## UNDERSTANDING TOGAI

Togai is a comprehensive platform that simplifies usage-based pricing and billing for software  
and SaaS companies. It tracks and stores customer usage data in real-time, applies pre-  
configured pricing rules to calculate charges, and automates the generation of invoices and  
payment collection. The platform allows businesses to define flexible pricing models, such as  
unit-based or tiered pricing, and ensures accurate and transparent billing. Additionally, Togai  
provides detailed financial reports and insights, helping companies optimize their  
monetization strategies and make data-driven decisions. By streamlining the entire process,  
Togai enables businesses to scale efficiently while focusing on delivering value to their  
customers.

Togai is a platform specifically designed to make it easier for software and SaaS companies to  
manage usage-based pricing models. These models charge customers based on how much  
they use a product or service, rather than a flat subscription fee. Here’s a detailed breakdown  
of what Togai does:

1\. Track Usage: Togai helps you monitor how your customers are using your software or  
services. For example, it can keep track of things like the number of API calls, data  
processed, or hours of usage. This data is stored and organized for billing purposes.  
2\. Set Pricing: With Togai, you can define pricing models that suit your business. Whether  
you charge per unit (e.g., $0.01 per API call), tiered pricing (e.g., different rates for  
different usage levels), or custom pricing models, Togai makes it easy to configure and  
manage.  
3\. Apply Pricing Rules: Once the usage data is collected, Togai automatically calculates  
charges based on the pricing rules you’ve set. This ensures accurate and consistent  
billing.  
4\. Automate Billing and Payments: Togai streamlines the entire billing process. It generates  
invoices for customers based on their usage, automates payment collection, and  
integrates with payment gateways to handle transactions efficiently.  
5\. Financial Reporting and Insights: Togai provides detailed financial reports and analytics.  
You can see how much revenue is being generated, identify trends, and gain insights into  
your customers' usage patterns. This helps you refine your monetization strategies and  
make data-driven decisions.

In essence, Togai simplifies the complex process of tracking usage, managing pricing, and  
automating billing for businesses that rely on consumption-based pricing. It helps you focus  
on growing your business while ensuring accurate and transparent billing for your customers.

Overview:  
Togai is a metering and billing platform tailored for software and SaaS businesses that use  
usage-based (or consumption-based) pricing models.

Key Features:  
 1. Track and Meter Usage:  
Stores and monitors how customers interact with your software.  
Examples include tracking API calls, data usage, or active hours.  
2\. Pricing Management:  
Allows you to set flexible pricing structures based on your business needs.  
Supports unit-based pricing, tiered pricing, or custom pricing models.  
3\. Rate and Calculate Costs:  
Automatically processes usage data to calculate charges.  
Ensures accurate billing by applying pre-configured pricing rules.  
4\. Automated Billing and Payments:  
Generates invoices automatically based on customer usage.  
Handles payment workflows seamlessly through integrations with payment gateways.  
5\. Financial Reporting and Insights:  
Offers detailed reports and analytics on revenue, customer usage, and trends.  
Provides actionable insights to optimize monetization strategies.

## Simplifies the complexity of managing usage-based pricing.

Reduces manual errors in billing and invoicing.  
Saves time by automating repetitive financial workflows.  
Helps businesses gain a clearer understanding of revenue streams and customer  
behavior.

Ideal For:  
Businesses with a consumption-based pricing model looking for efficient tools to manage  
usage data, pricing, billing, and financial insights.

## real time example

A well-known real-world example of a company that uses usage-based pricing (similar to what  
Togai supports) is Amazon Web Services (AWS). Here’s how AWS’s pricing model works and  
how Togai could enhance it:

## Example: Amazon Web Services (AWS)

AWS offers cloud computing services with usage-based pricing. Customers pay only for what  
they use, such as:

1\. Compute Power (e.g., EC2 instances charged per hour or second of use).  
Amazon EC2 (Elastic Compute Cloud) is a web service provided by Amazon Web Services  
(AWS) that allows you to rent virtual servers (called instances) to run applications on the  
cloud.  
Why Use EC2?  
To host websites or applications.  
For running backend services or APIs.  
For big data processing or machine learning tasks.  
 To run test environments for software development.  
Types of EC2 Pricing Models:  
On-Demand: Pay by the hour or second with no long-term commitment.  
Reserved Instances: Commit to a longer-term (e.g., 1-3 years) for lower costs.  
Spot Instances: Use spare capacity for a steep discount, but instances can be  
interrupted.  
Savings Plans: Flexible pricing with a commitment to a certain usage level.  
2\. Storage (e.g., S3 storage charged per GB stored per month).  
3\. Data Transfers (e.g., outbound data transfer charged per GB).

## AWS Billing Challenges Without Automation:

1\. Tracking Usage: AWS must monitor millions of customers and their usage across various  
services.  
Example: Customer A runs a virtual server (EC2) for 10 hours and stores 500 GB of  
data in S3.  
2\. Complex Pricing: AWS pricing includes tiered rates, discounts for reserved instances, and  
free tiers, which make manual calculations difficult.  
3\. Generating Bills: AWS needs to produce highly detailed invoices, breaking down charges  
per service, per region, and per usage type.  
4\. Customer Insights: AWS provides analytics to help customers optimize their usage and  
costs, which requires processing vast amounts of data.

## How Togai Could Enhance AWS-Like Operations:

1\. Track Usage: Togai would automatically collect and meter data for each service (e.g., EC2,  
S3).  
Example:  
Togai monitors Customer A's EC2 usage (10 hours) and S3 storage usage (500 GB).  
2\. Configure Pricing: AWS’s complex pricing structures (e.g., tiered rates, free tiers, and  
regional pricing) can be configured in Togai.  
Example:  
First 50 GB of data storage = free.  
Next 450 GB of data storage = $0.023/GB.  
3\. Automate Billing: Togai would calculate the total charges and generate an invoice:  
EC2 charges: 10 hours × $0.1/hour = $1.  
S3 storage charges: 450 GB × $0.023/GB = $10.35.  
Total Invoice: $11.35.  
4\. Provide Insights: Togai would generate detailed reports for AWS and its customers, such  
as:  
For AWS: Revenue trends, service utilization, and customer behavior.  
For Customers: Usage breakdowns, cost optimization suggestions, and alerts for  
unusual usage patterns.  
5\. Payment Automation: Togai integrates with payment gateways to streamline payment  
collection.

Real-World Parallel:  
AWS already relies on highly customized internal billing systems, but Togai offers similar  
capabilities in a more accessible and flexible platform. This can empower smaller SaaS  
companies to offer AWS-like usage-based pricing with minimal effort.

Togai simplifies what AWS does at scale, making it available for businesses that want to  
implement and manage usage-based pricing models effectively.

\[Link\] metering  
Togai's Metering System: Simplified Explanation

...................................................

Togai uses an event-driven architecture to track and process usage data in real time. It helps  
you convert raw data into meaningful metrics for billing your customers. Here's an easy-to-  
understand breakdown:

What is an Event?

An event is any action performed by your customer that you want to charge for.  
Examples:

## A server sending heartbeat signals to track uptime.

An API call made by a user.  
An SMS sent through a communications platform.

## What is an Event Schema?

To process these events, you need to define how the event will be structured. This structure  
is called the event schema. Think of it as a blueprint that tells Togai (or any system) what  
data to expect when an event happens.

## Parts of an Event Schema

1\. Attributes:  
These are the measurable values you want to track.  
For example, in a cloud storage event, you might want to track:  
The amount of data processed (in GB-minutes).  
For a fintech transaction, you may track:  
The amount of money being transferred (the transaction amount).  
In a logistics event, you might measure:  
How far something was traveled.  
You can either send raw data (like 10GB) or aggregated data (like a total of multiple  
transactions combined).  
2\. Dimensions:  
These are like categories that help you group or filter data.  
 For example, in a cloud provider event:  
You might use region or instance type as dimensions to categorize the event.  
For a payment system, dimensions could be things like payment mode (credit card,  
debit card, etc.).  
In an SMS delivery event, the SMS operator could be a dimension to track.  
3\. Enrichments:  
These are extra calculations or transformations that are done on your data.  
For instance, a storage provider may track read and write rates separately but need  
to charge for the total throughput (combined read and write rates). Togai can  
automatically calculate this total for you.  
Enrichments use something called jsonLogic syntax, which is a way to define how to  
transform or calculate new values from the data you already have.

## Designing an Event Schema

## Keep these principles in mind:

1\. Work with what you already have: Design the schema around your existing data.  
2\. Flexibility: Make the schema adaptable to future needs.  
3\. Unique Event IDs: Assign a unique event\_id to each event for consistency.  
Togai prevents duplicate events with the same ID for 45 days.

## Lifecycle of an Event Schema

1\. Draft Mode:  
Create and test your schema.  
Add, edit, or delete attributes and dimensions.  
Draft schemas can’t be linked to usage meters.  
2\. Active Mode:  
Publish the schema to make it usable.  
You can only add new attributes, dimensions, or enrichments (not delete or edit  
existing ones).  
Deactivate schemas if they’re not associated with any usage meters.  
3\. Archived Mode:  
Archive inactive schemas you no longer use.  
Archived schemas won’t appear on the dashboard but are stored for reference.  
Schemas cannot be permanently deleted (contact Togai support for assistance).

## Example: Cloud Storage Provider

## A storage company bills based on:

## 1\. Storage: Tracked in TB-minutes.

2\. Performance: Measured in GBps per TB (read and write rates).

## They set up a heartbeat event to monitor these metrics every minute.

 Attributes: Storage (TB-minutes), Read Rate, Write Rate.  
Dimensions: Region, Instance Type.  
Enrichment: Total throughput = Read Rate + Write Rate.

This setup allows the company to collect all the necessary data for billing in one event  
schema.

In summary, Togai’s event schema lets you organize and customize the data you need for  
usage tracking and billing, making it flexible and scalable for your business needs.

## What is Event Ingestion?

Event ingestion is how Togai receives and processes usage data from your product to  
calculate costs for your customers. Togai is designed to handle a lot of data, ensure no data is  
lost, and process it accurately.

## Key Features of Togai’s Ingestion System

1\. Scalability:  
Handles millions of events every day (up to 10,000 events per second).  
2\. Reliability:  
Built to avoid data loss with backups and fail-safe mechanisms.  
3\. Accuracy:  
Togai makes sure each event is processed once and only once (using a unique ID for  
each event).

## What Does an Event Contain?

## An event is the data sent to Togai to track product usage. It includes:

1\. schemaName:  
This tells Togai which template (schema) the event belongs to.  
2\. id:  
A unique key to prevent duplicate processing.  
3\. timestamp:  
The exact time the event happened (formatted in ISO 8601).  
4\. accountID:  
Identifies the customer using your product. Togai lets you use aliases like email or  
phone numbers to match customer accounts.  
5\. event properties:  
The specific details (attributes and dimensions) of the event, as defined in your event  
schema.  
Example: For a storage service, properties might include "data used" (e.g., 10 GB) and  
"region" (e.g., US-East).

## Idempotency (Preventing Duplicate Processing)

Togai ensures no event is processed more than once, even if you send the same data multiple  
times.

Events with the same ID will be ignored if sent again within a 45-day window.  
Backdated events can be sent, but only within the grace period set for the customer.

## How to Send Events to Togai?

## There are different methods based on your needs:

## 1\. Async Event Ingestion:

Best for postpaid billing.  
You can send data to Togai without interrupting your app’s main operations.  
Backdated events are supported.  
2\. Async Batch Ingestion:  
For high-volume data, send up to 1,000 events at once in a batch.  
3\. Sync Event Ingestion:  
Used for prepaid billing where customers have usage limits (e.g., 1,000 API calls).  
Data is processed immediately to check if the customer is eligible for more usage.

## What Happens to an Event After Sending?

## Events go through three possible states:

## 1\. Processed Events: Successfully handled and included in calculations.

2\. Unprocessed Events: Couldn’t be processed because of errors (e.g., missing data).  
3\. In-Progress Events: Waiting to be processed.

## What If Something Goes Wrong?

## Network or Server Errors (5xx):

Some events might succeed, others might fail. Always retry until you get a success  
message.  
Togai prevents duplicates, so retries are safe.  
Payload Errors (4xx):  
These indicate issues like incorrect data in the event. Don’t retry automatically.  
Instead, save the event in a "dead letter queue" (a log of failed events) and investigate.

## Visibility and Debugging

## Togai provides a clear view of how events are processed:

## 1\. From ingestion to usage tracking.

2\. To revenue calculation and invoicing.

This visibility helps you audit event data and fix issues quickly.

In short, Togai ensures your usage data flows smoothly, processes it reliably, and provides  
tools to debug or improve when needed.  
.......................................................................

## \[Link\] is a Usage Meter?

A usage meter tracks how much a customer uses a service so you can bill them accordingly.  
It's like a tool that transforms raw data into a single metric (like total usage) to calculate how  
much to charge.

## Design Principles for Usage Meters:

Real-time: Tracks usage in real-time, which is important for customer experience and  
business decisions.  
User Experience: Easy to set up, with both simple and complex options for different  
needs.  
Independent: Works as a standalone tool, meaning you don't need to use Togai’s pricing  
system to track usage.

## Usage Metering Process:

1\. Data Source: This is where your raw data comes from (like a database or event store).  
2\. Filter Data: You can apply filters to choose what data you want to track.  
3\. Transformation: You can change the data or apply formulas (like converting time from  
minutes to hours).  
4\. Aggregation: This is where data is combined (summed up, counted, etc.) to create the  
final usage metric.

Note: In Togai, it automatically handles duplication, so you don’t need a separate step for  
that.

## Types of Data Sources:

Togai as Data Store: Store your raw data in Togai for real-time tracking.  
External Data Source: Connect Togai to your existing data source (like an SQL database)  
and fetch data at intervals (e.g., hourly, daily).

## Key Concepts in Metering:

Transformation Example: If you track usage in GB-min but want to charge based on GB-  
month, you can use a formula to convert the data.  
Aggregation Types:  
Count: Counts the number of events. For example, how many transactions a customer  
made.  
Sum: Adds up values. For example, the total amount of money spent.  
Max/Min: Tracks the highest or lowest value. For example, the peak load in a day.  
Average: Calculates the average of data points. For example, the average transaction  
amount.  
Distinct Count: Counts the number of unique values. For example, the number of  
unique users.  
External Data Source Connections:

SQL: Connect to databases using SQL and define queries for data retrieval.  
HTTP: Connect to external APIs and fetch data.

## Example: Payment Platform (Stripe):

## Let’s say you want to model Stripe’s pricing:

## Pricing: 2.9% of the transaction amount + 30¢ per transaction.

Usage Meters:  
1\. First Usage Meter: Tracks the total amount spent and calculates 2.9% of it (use "Sum"  
as aggregation).  
2\. Second Usage Meter: Counts the number of transactions and multiplies it by 30¢ (use  
"Count" as aggregation).

## Usage Meter Lifecycle:

1\. Draft Mode: Create and test usage meters. You can edit them, but they can't be linked to  
pricing plans yet.  
2\. Active Mode: When you're ready to use the meter, make it active. You can’t edit it once  
it’s active.  
3\. Archive Mode: If you no longer need a meter, archive it. It won’t show in the dashboard  
but is still stored.  
4\. Delete: Currently, you can’t delete a usage meter, but you can contact Togai for help if  
needed.

In simple terms, Usage Metering helps you track how much a customer uses your service and  
then calculate how much to charge them. It does this by transforming and aggregating raw  
data (like usage counts or amounts) into a single metric that can be used for billing.