Skip to main content
Usage-based billing charges customers based on how much they actually use your product. This guide walks through setting up metered billing end-to-end.

Overview

1. Define a metric

A metric is a named unit of measurement. Create metrics in Dashboard → Metrics or via the API. Common examples:
  • api_calls — number of API requests
  • storage_gb — gigabytes of data stored
  • transactions — payment transactions processed
  • active_users — monthly active users

2. Create a pricing plan

A Plan defines how metrics map to prices. Monigo supports: Flat rate — fixed price per unit
Graduated tiers — different rates at different volumes
Package / block pricing — charge for bundles of units

3. Subscribe a customer to a plan

4. Ingest usage events

Send events in real time as your customers use your product:

5. Billing cycle end

At the end of each billing period, Monigo:
  1. Aggregates all usage for each customer
  2. Applies pricing tiers
  3. Generates an invoice
  4. Triggers payment via your connected provider
  5. Delivers a invoice.paid or invoice.failed webhook

Hard caps and overages

To prevent surprise bills, you can configure a hard cap:
When a customer reaches the cap, Monigo sends an alert webhook and you can pause or throttle their access. To allow overages instead: