Context
You already meter usage in your product, data warehouse, or internal billing scripts. You know how many API calls, transactions, or gigabytes each customer consumed, and you want to keep that logic where it is. You only need Hyperline to apply the right price, commitments, and invoicing rules. Hyperline’s usage-based billing always starts from usage events and an aggregator. With in-house metering, each event carries a quantity you computed, and the aggregator only reads that number back. Hyperline doesn’t re-measure anything.Example 💡
Your platform computes the number of processed documents per workspace every night. At the end of each month, your billing job knows that the customer Acme processed 12,480 documents. You send Hyperline one event with
quantity: 12480 for November, and Hyperline bills it with your tiered price on the November invoice.Prerequisites
Before you begin, make sure you have:- A usage metric your system already computes per customer, such as API calls, documents, or gigabytes
- Your customers created in Hyperline, ideally with their external ID set to the identifier your system uses
- A way to send data to Hyperline: the events API, a data loader, or a CSV import
- A test mode account to validate the setup before going live
Steps
1. Design the usage event
Each time your system reports usage, send a new event carrying the quantity it computed. Treat events as immutable: never resend an event to change its quantity. To change a total, send another event (see step 5). This keeps a full history of what your system reported and when.Event
2. Create a sum aggregator
Go to Usage > Aggregators, then click New aggregator:- Enter a name, such as “Documents processed”.
- Set Event type to the
event_typeyou send, for exampledocuments_processed. - Select the Sum operation and the
quantityproperty. - Set the Unit name, such as
documents. It appears on prices, invoices, and the customer portal. - Save the aggregator.
If your system reports a cumulative total-to-date instead of the quantity since its previous report, use the SQL formula operation with
last(quantity). Hyperline then bills only the most recent total of the period. See SQL formulas.3. Create the usage product and subscription
Create a usage product linked to the aggregator, then add it to the customer’s subscription. Pricing, commitments, and caps work exactly as with events Hyperline meters itself. Follow Configure usage-based billing for the detailed steps. When you add the product to the subscription, keep the Metering period set to Same as payment interval. Hyperline then bills, for each period, the quantity whosetimestamp falls inside that period.
4. Send the quantities
Choose the method that matches how your system works:API
Your billing job calls the events API, or the batch endpoint for many customers at once.
Data loaders
Hyperline runs a query on your database that returns one row per customer and period.
CSV import
You upload a file with one line per customer and period.
id, the quantity, and a date inside the billing period as timestamp.
You can report usage once, when the period is over, or regularly during the period:
- Once per period: simplest option. Send one event with the period total. The open invoice shows no usage for the product until you send it.
- Regular reports: send a new event every day or every hour with the usage since the previous report. The customer’s open invoice, usage tab, and threshold alerts stay up to date during the period.
5. Correct a quantity
To fix a total, don’t modify the event you already sent. Send a new adjustment event with its ownrecord.id, a timestamp inside the same billing period, and the difference as quantity. Use a negative quantity to lower the total.
Example 💡
Your system reported 12,480 documents for Acme in November, but a reprocessing job shows the real total is 12,300. You send a new event with
record.id acme-workspace-42_documents_2026-11_adjustment-1 and quantity: -180. Hyperline sums both events and bills 12,300 documents on the open or grace period invoice.reason to the record to explain each adjustment.
6. Check the result
Validate the setup from the customer page:- Open the Subscriptions tab and check the usage displayed next to the product.
- Open the Invoices tab and check the
openinvoice for the current period. - Click the usage detail icon to see the events behind the total, with the quantities you sent.
Good to know
- Customer view: the usage details and the customer portal show the totals you sent, not the underlying activity. If customers need a breakdown, send one event per breakdown value (for example per project) instead of a single total.
- Several subscriptions: if a customer has several subscriptions with the same usage product, tag each event with its subscription. See Target usage events to a subscription.
- Upfront billing: upfront metered products also work with quantities from your system. Hyperline uses the quantities you sent for the closed period to compute the correction line.
Next steps
Send usage data
Event structure, customer matching, and API limits.
Configure aggregators
Sum, SQL formulas, filters, and thresholds.
Review metering settings
Metering periods and usage windows on subscriptions.
Invoice terms
Grace period and invoice finalization.
Is something still unclear? Don’t hesitate to reach out to our team via the in-app chat if you need additional support.

