Skip to main content
Usage-based billing lets you charge customers based on what they consume: API calls, transactions, storage, compute hours, seats, AI usage, or another measurable activity.
Monetizing AI products? See AI monetization for guidance on usage-based billing, prepaid credits, wallets, and hybrid pricing patterns for AI products.
In Hyperline, the setup has four building blocks:
Building blockWhat it does
Usage eventsRaw customer activity sent to Hyperline through a CSV import, API, data loader, or test simulation.
AggregatorTurns usage events into one billable metric, such as a count of API calls or the sum of stored gigabytes.
Usage productDefines what you sell and how that metric is priced.
SubscriptionAssigns the product to a customer, with billing, payment, and metering settings.
Start with one simple usage metric before adding tiered pricing, filters, commitments, or spending caps. It is easier to validate the full billing flow when the first setup is intentionally small.

Before you start

Make sure you have:
  • A customer to test with, or permission to create one in Customers
  • A usage metric you want to bill, such as API calls, processed transactions, or storage volume
  • Usage data available through one of the supported ingestion methods
  • A test mode workspace if you want to experiment before billing real customers

Example 💡

You sell an API product with a monthly platform fee and a usage-based add-on. The add-on bills each customer for the number of API calls they make during the month. To set this up, you send API call events to Hyperline, create an aggregator that counts those events, link the aggregator to a usage product, then add that product to the customer’s subscription.

Setup flow

1. Connect usage data

Hyperline needs usage events before it can calculate a usage-based charge. Choose the ingestion method that matches where your usage data already lives:

CSV import

Upload usage events from a spreadsheet or exported report.

API

Send events from your application or backend systems.

Data loaders

Pull usage data from a connected database or warehouse.

Simulated events

Create test usage directly from a customer page in test mode.
For each event, Hyperline needs enough information to identify the customer, event type, timestamp, and usage properties you want to bill or filter on.
If you are still exploring the model, use simulated events in test mode. You can validate the subscription and invoice behavior before connecting a production data source.

2. Create an aggregator

Go to Usage > Aggregators, then click New aggregator. An aggregator defines how Hyperline turns raw events into a billable number. Configure:
  • Event type: the event category to measure, such as api_call, transaction, or storage_snapshot
  • Operation: how the metric is calculated
  • Unit name: the label shown in usage charts, prices, invoices, and the customer portal
  • Filters: optional rules that include only matching events
OperationUse it when
CountEach matching event should count as one unit, such as one API call or one transaction.
SumA numeric field on the event should be added up, such as gigabytes stored or compute minutes.
SQL formulaYou need a custom calculation, such as applying an allowance, cap, or adjustment before billing.
Learn more in Aggregators.

3. Create a usage product

Go to Products, click New product, then choose Usage. When configuring the product:
  1. Add the product name and description.
  2. Select the aggregator you created.
  3. Configure at least one recurring price.
  4. Choose the pricing model and tiers that match your commercial offer.
  5. Save the product.
For a simple first setup, use one recurring price with a straightforward rate. You can add advanced pricing later, such as volume tiers, basis points, or price-level metering filters.
Usage products are configured in the product catalog, then reused in quotes, subscriptions, and customer-specific agreements. See Products and prices for the full product setup reference.

4. Add the product to a subscription

Once the usage product has a recurring price, assign it to a customer subscription.
  1. Open the customer page.
  2. Click Actions > Assign new subscription, or go to Subscriptions and click New subscription.
  3. Select the customer and subscription start date.
  4. Click Add product and select the usage product.
  5. Review the product price, billing interval, and metering settings.
  6. Open Payment settings.
  7. For testing, choose Manually later so the subscription can be created without collecting payment immediately.
  8. Click Assign subscription.
After the subscription is assigned, Hyperline starts tracking usage for the product based on the subscription’s metering period.
If the customer has both fixed and usage-based charges, add both products to the same subscription. This keeps the recurring fee and usage charges together in the customer’s invoice flow.

5. Check usage and invoices

After events are connected and the subscription is active, validate the setup from the customer page:
  • Open the customer’s Usage tab to see current aggregator consumption.
  • Open the customer’s Subscriptions tab to review usage on the active subscription.
  • Click Explore or the usage detail icon to inspect the events behind the total.
  • Open the customer’s Invoices tab to check the open invoice preview for the current period.
An open invoice is a live preview. For usage-based subscriptions, it updates as new events are recorded. At the end of the billing period, the invoice enters the configured grace period before it is finalized and sent for payment.

Common first checks

If the subscription does not show the usage you expect, check these items first:
  • The event timestamps fall inside the subscription’s current metering period.
  • The event type matches the aggregator’s Event type.
  • The event belongs to the same customer as the subscription.
  • The aggregator filters do not exclude the events.
  • The usage product is included in an active subscription.
For more invoice behavior details, see Invoice terms.

Next steps

Follow the full setup guide

Walk through an end-to-end usage-based subscription setup.

Configure aggregators

Learn how count, sum, formulas, filters, and thresholds work.

Explore customer usage

Monitor consumption and inspect the events behind each metric.

Review metering settings

Understand subscription-level metering periods and usage windows.
Is something still unclear? Don’t hesitate to reach out to our team via the in-app chat if you need additional support.