Setup Guide
To set up usage-based billing:- Create a Product: Define the service (e.g., “Cloud Storage”).
- Create a Plan: Select Usage-based pricing.
- Meter Name:
storage_gb - Billing Scheme:
per_unit - Price: $0.10 per GB.
- Meter Name:
- Subscribe Customer: Assign the plan.
- Report Usage: Send usage events via API.
Usage Reporting Models
1. Metered (Sum)
Good for events like “API Calls” or “Emails Sent”.- You send:
+1,+5. - We bill: Sum of all events.
- Reset: Counter resets to 0 at start of next cycle.
2. Licensed (Max)
Good for “High water mark” billing, like “Max Concurrent Connections”.- You send: Current usage periodically.
- We bill: The highest value seen during the period.
3. Gauge (Last)
Good for “Number of Active Seats” where you want to bill for the count at the exact moment of invoicing.- You send: Current count.
- We bill: The last value recorded before the cycle closes.
Handling Overages
You can combine flat fees with usage.- Plan: $20/month (includes 1000 API calls).
- Overage: $0.01 per call after 1000.
- Tier 1: 0-1000 units -> $0 (Flat fee covers this)
- Tier 2: 1001+ units -> $0.01/unit