Metering and billing
Metering and billing in SaaS is where engineering meets finance, turning raw usage data into revenue streams. Getting this right is crucial because it directly shapes how customers perceive your product. Let’s break it down.
What metering actually means
Metering is the raw data collection layer. It’s all about tracking product usage, sometimes in real time. Think of it as the "utility meter" for your SaaS API calls, storage consumed, active users, compute time, transactions and so on. This data forms the backbone for billing and product insights. If metering is inaccurate you risk losing customer trust and can’t even accurately recognise your own revenue.
You might think that metering is just another type of metrics, but this is actually not exactly right. Unlike metric aggregators, a metering system must have two critical features: guaranteed delivery and deduplication. Guaranteed delivery ensures you capture every usage event, so you don't miss your revenue. Deduplication, on the other hand, ensures that a customer isn’t charged multiple times for the same consumption event, which could quickly damage your reputation and customer relationships.
Billing turns usage into money
Billing sits on top of metering. It translates tracked usage events into charges, applying your pricing model. A good billing system should (1) apply the right price to each unit of usage, (2) generate accurate, understandable bills, (3) collect payments through the channels your customers prefer, and (4) remain compliant with regulatory requirements.
The default option in SaaS is not to build your own billing system from scratch. Instead, most companies rely on proven, widely available billing platforms that already handle the heavy lifting. This approach saves engineering time, reduces compliance headaches, and lets you focus on your core product.
Common SaaS pricing models
Choosing the right pricing model for your offering is outside the scope of this discussion, but we will explore the main types of SaaS pricing models from a software architecture perspective.
Flat-rate pricing
A flat-rate pricing model is a simple pricing strategy where a business offers a single product or service for one fixed price. Customers pay the same monthly or annual fee for unlimited access to all features, regardless of how often they use the product. This model is very straightforward and makes billing and revenue forecasting easy for both the business and the customer, as there are no variable costs.
When you use flat-rate pricing, the architectural requirements are simpler. Since every customer pays the same fixed amount, you don't need to build a complex system to track their usage. Your billing system only needs to handle basic functions like subscriptions, renewals, and payments.
The main challenge, however, shifts from usage tracking to cost management. You need to ensure the total cost of serving a customer is less than the flat rate they pay. This is where tenant cost allocation becomes critical. It gives you the ability to understand your profitability on a per-customer basis, so you can adjust your pricing or optimise your infrastructure as needed.
Tiered pricing
A tiered pricing model allows SaaS providers to offer different plans, each with its own features and usage allowances. Customers pick the tier that fits their needs and upgrade when they require more functionality or higher limits. It allows smaller customers to start affordably, while larger customers choose higher-tier levels.
In a tiered pricing model, the application's architecture must enforce entitlements and usage limits. For example, a basic plan might restrict storage or hide certain premium features, while an enterprise plan would grant access to them. This requires close integration of authentication, entitlement, limiting, and billing subsystems. The main challenge is ensuring that entitlements remain consistent across the entire product and that upgrades or downgrades happen seamlessly.
Since free or low-paying customers can create significant load, adopting a multi-tenant architecture for lower-tier customers is often beneficial. Combined with usage limits, this helps ensure they don’t overconsume costly resources. To support this effectively, the architecture should also provide strong isolation mechanisms.
Per-user pricing
Per-user pricing, also known as the seat-based model, charges customers based on the number of active users or seats they add to their account. It’s intuitive, scales naturally with team growth, and is widely used for collaboration tools like Slack or Zoom. When user count strongly correlates with value, this model remains a good choice.
Identity and Access Management (IAM) is crucial for managing seat-based pricing. Your architecture needs to track how many active users each customer has, manage their roles, and ensure licenses are enforced in real time. It's also vital to have smooth workflows for onboarding, offboarding and integration with corporate Single Sign-On (SSO).
Usage-based pricing
Usage-based pricing, also known as the pay-as-you-go model, ties costs directly to consumption, such as API calls or storage. Customers usually like this model because it aligns with the value delivered by the SaaS provider. The more they use, the more they pay, which also creates a low barrier to entry for new users.
However, it’s the most architecture-heavy pricing model because it relies on accurate metering pipelines. You need to capture raw usage events, such as API calls, and store them securely for billing purposes. This requires low-latency data ingestion, durable event storage, and aggregation jobs that convert usage into billable units. Transparency here is key, as customers often expect real-time dashboards and consumption alerts to prevent unexpected charges.
Hybrid pricing
You don’t have to limit yourself to a single pricing model. Many successful SaaS products blend several. For example, you might offer a free tier to drive adoption, introduce tiered pricing for different customer segments, and add usage-based charges for power users. This flexibility enables you to reach a wider range of customers.
The flip side of this flexibility is the set of challenges that come with any pricing model you adopt. Architecturally, you need both subscription management (for tier levels) and metering services (for usage-based charges) to work seamlessly together. The tricky part is consolidating these two billing sources into a single invoice while keeping customer-facing dashboards accurate. Many SaaS companies prefer to purchase third-party metering and billing solutions once they reach this level of complexity.
The right metering & billing architecture
To build a metering and billing architecture aligned with your business, you need to work backwards from your requirements. The following questions will help you uncover the information needed to design it effectively.
What pricing model are you using or planning to use?
This information is crucial because the pricing model directly determines what needs to be measured, stored, and billed. A flat subscription might only require tracking active users, while a usage-based model requires fine-grained metering pipelines. Without clarity on the pricing model, you risk implementing a billing architecture that is not aligned with your needs.
How many billing events do you process daily/monthly?
If you’re processing only a few hundred billing events a month, simpler systems, even manual invoicing may be enough. But if you’re handling millions of usage events daily, you’ll need a high-throughput metering pipeline and robust data storage to prevent bottlenecks and billing errors.
Do you need support for trials, discounts, credits, or custom enterprise contracts?
Answering this question reveals how flexible your billing system needs to be. If you only plan to sell fixed subscriptions, your setup can remain simple. But the moment you want to support free trials, apply discounts, issue credits, or negotiate custom enterprise deals, your architecture must be flexible enough to support your needs.
In SaaS, billing isn’t just about collecting money, it’s about building trust. Clear, accurate invoices reduce disputes and improve customer satisfaction, while flexible billing models open the door to new revenue streams. As your customer base grows, automation frees your finance team from manual work, so they can focus on more strategic tasks.