Bill SaaS Customers Based on Usage

For a SaaS business implementing usage-based billing, Atomic Fusion provides a managed streaming foundation that connects source applications with the services responsible for decisions and follow-through. Where Kafka already carries these events, Atomic replaces that streaming layer while the surrounding applications retain their roles.

The Challenge

  • In this proposed implementation, product services, metering gateways, and entitlement applications contribute different parts of the picture. Customers need charges that can be traced back to measured product activity, including late arrivals and corrections; the commercial workflow should distinguish metering from pricing.
  • Late events can cross billing boundaries and require explicit adjustments.
  • Retries can inflate charges when a usage event lacks a stable identity.
Billing SaaS based on usage

How It Works

Atomic Fusion provides the Kafka-compatible transport and retained event history between product services, metering gateways, and entitlement applications and the downstream processing that turns those events into action. In a representative workflow

  • 1. Capture Changes at Their Source

    Producer applications or an appropriate database change-capture path publish feature usage, resource consumption, account changes, corrections, and billing-period boundaries. Each event includes a stable identifier, source reference, and occurrence time. Use tenant and usage-event identifiers to connect an update with related records, and preserve the source reference for later verification. The producer reports the originating business change; it does not assume that publication means every downstream action has completed.

  • 2. Organize and Retain the Event Stream

    Atomic accepts these records into topics organized around tenant and usage-event identifiers. Select keys and partitions to support the required entity grouping and consumer processing. Independent consumer groups can use the same published events for the primary workflow and its supporting operational views, without requiring the source to implement a new feed for each consumer.


  • 3. Apply the Workflow Logic

    Downstream, a metering service validates units, deduplicates events, and applies versioned aggregation rules. This processing service owns its state, business rules, and any model execution. It writes the resulting view or output to an application database or analytical destination suited to its consumers. Atomic retains the event stream; the destination serves the processed information, and the application updates it as relevant events arrive. It records which source events informed the resulting update, so an operator can connect an application outcome to the evidence available at that time.

  • 4. Deliver the Action and Capture Its Outcome

    Consuming applications publish reconciled usage totals to billing and customer dashboards. They publish relevant completion or exception events so the workflow can distinguish a requested action from an acknowledged result. Keep raw usage separate from rated charges; billing controls tariffs, adjustments, and idempotent invoice posting.

  • The working flow connects product services, metering gateways, and entitlement applications to a defined processing step and an observable response, while Atomic supplies the event backbone rather than the business decision.

Why Atomic Fusion

  • Preserve Acknowledged Metering Events Before Downstream Billing Aggregation

    Atomic acknowledges writes only after durable persistence, including flushing writes to persistent media, across storage in two of three availability zones. Replication and placement are platform responsibilities, giving downstream applications a dependable retained event foundation.

  • Recalculate Retained Usage After Correcting an Aggregation Rule

    All retained events remain on distributed flash storage, without a separate cold tier to retrieve before replay. Consumers can revisit available history for reconstruction or revised processing; retention settings define how far back they can go.

  • Group Tenant Consumption Coherently Without Broker Storage Determining the Billing Design

    Atomic backs logical partitions with horizontally distributed storage, allowing partition choices to emphasize entity grouping and consumer parallelism. Within-partition log order remains distinct from chronological event order; applications must handle late arrivals and corrections.

  • Carry Uneven Tenant Usage Without Storage-driven Partition Proliferation

    Atomic Fusion delivers 20× higher throughput per partition. A logical partition uses distributed storage rather than concentrating its durable data on one broker. This provides ingestion headroom; consumer processing may still require parallelism.

The Result

SaaS teams can produce more explainable usage bills and repair calculation errors from retained consumption evidence.

Request a Demo