Build your first usage-based pricing model in Orb. This quickstart walks through event ingestion, metric definition, pricing configuration, and invoice generation—showing how Orb’s query-based architecture supports flexible, auditable billing.Documentation Index
Fetch the complete documentation index at: https://docs.withorb.com/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll build
A complete usage-based billing workflow:- Ingest raw usage events (API calls, compute hours, or any measurable activity from your product)
- Define a billable metric as a query over your events
- Configure pricing using the metric (per-unit, tiered, or volume-based)
- Create a customer subscription linking them to your pricing
- Generate an invoice calculated from actual usage
Prerequisites
Before starting, ensure you have:- Orb account — Test mode recommended for this quickstart. Sign up if you don’t have an account.
- API token — Generate from Connections → API tokens. Required for API requests.
- Your usage data schema — Understand what events you’ll send and what properties they’ll include.
- 30 minutes — Estimated time to complete all steps.
The implementation path
This quickstart follows the natural data flow in Orb’s query-based architecture:1. Ingest events
Send raw usage data to Orb. Events are stored immutably as the foundation for all billing calculations.2. Create metrics
Define billable metrics as queries over your events. See how metrics can be changed without re-ingesting data.3. Configure pricing
Build your pricing model using metrics—per-unit rates, volume tiers, or custom structures.4. Create subscriptions
Link a customer to your pricing. Orb begins tracking usage and calculating charges in real-time.5. Set up invoicing
Generate your first invoice from actual usage. Understand how invoices are deterministic queries, not side effects.6. (Optional) Explore simulations
Run “what-if” scenarios to test pricing changes against historical usage before deploying them.What you’ll learn
- Why sending raw events once lets you change billing metrics anytime without re-instrumentation
- How to test pricing changes against real usage data before deploying them to customers
- Why late-arriving data and backfills work without manual reconciliation or invoice corrections
- How to trace every invoice charge back to its source events for complete audit trails
- The foundation for Revenue Design workflows that eliminate cross-functional coordination
Success criteria
By the end of this quickstart, you’ll have:- Events flowing into Orb via API
- A billable metric calculating in real-time
- A pricing plan using your metric
- A customer subscription tracking usage
- An invoice generated from actual usage data
- Understanding of how query-based architecture supports this workflow