Simply counts the number of events received.Use case: API calls, page views, file uploadsCalculation: Total number of events
Adds up values from a specific property in your events.Use case: Data transfer, storage consumption, processing timeCalculation: Sum of all property values
Records the highest value of a specific property during the billing period.Use case: Peak concurrent users, maximum storage used, highest bandwidthCalculation: Maximum property value observed
Uses the most recent value of a specific property.Use case: Current plan tier, latest configuration settingCalculation: Last recorded property value
Define the unit label for display purposes in reports and billing.Examples: “calls”, “GB”, “hours”, “tokens”
3
Configure Event Filtering (Optional)
Set up criteria to control which events are included in the meter.
Event filtering allows you to create sophisticated rules that determine which events contribute to your usage calculations. This is useful for excluding test events, filtering by user tiers, or focusing on specific actions.
Enable Event FilteringToggle Enable Event Filtering to activate conditional event processing.Choose Filter LogicSelect how multiple conditions are evaluated:
AND Logic
OR Logic
All conditions must be true for an event to be counted. Use this when you need events to meet multiple strict criteria simultaneously.Example: Count API calls where user_tier = "premium" AND endpoint = "/api/v2/users"
At least one condition must be true for an event to be counted. Use this when you want to include events that meet any of several criteria.Example: Count events where method = "POST" OR method = "PUT" OR method = "DELETE"
Setting Up Filter Conditions
1
Add Condition
Click Add condition to create a new filter rule.
2
Configure Property Key
Specify the property name from your event metadata.
Use Add Group to create additional condition groups for complex logic.
Filtered properties must be included in your event metadata for the conditions to work properly. Events missing required properties will be excluded from counting.
4
Create Meter
Review your meter configuration and click on Create Meter.
Your meter is now ready to receive and aggregate usage events.
Once you have created your meter, you need to link it to a product to enable usage-based billing. This process connects your meter’s usage data to pricing rules for customer billing.Linking meters to products establishes the connection between usage tracking and billing:
Products define pricing rules and billing behavior
Meters provide usage data for billing calculations
Multiple meters can be linked to a single product for complex billing scenarios
Transform your usage data into billable charges by properly configuring your product settings:
1
Choose Usage-Based Billing Product Type
Navigate to your product creation or editing page and select Usage-Based as the product type.
2
Select Associated Meter
Click on Associated Meter to open the meter selection panel from the side.This panel allows you to configure which meters will track usage for this product.
3
Add Your Meter
In the meter selection panel:
Click Add Meters to view available meters
Select the meter you created from the dropdown list
The selected meter will appear in your product configuration
4
Configure Price Per Unit
Set the pricing for each unit of usage tracked by your meter.
Number of units customers can consume at no charge before paid usage calculation starts.How it works:
Free threshold: 100 units
Price per unit: $0.50
Customer usage: 250 units
Calculation: (250 - 100) × 0.50=∗∗75.00** charged
Free thresholds are ideal for freemium models, trial periods, or providing customers with a base allowance included in their plan.
The free threshold applies to each billing cycle, giving customers fresh allowances monthly or according to your billing schedule.
6
Save Configuration
Review your meter and pricing configuration, then click Save Changes to finalize the setup.
Your product is now configured for usage-based billing and will automatically charge customers based on their measured consumption.
What happens next:
Usage events sent to your meter will be tracked and aggregated
Billing calculations will apply your pricing rules automatically
Customers will be charged based on actual consumption during each billing cycle
Remember that you can add up to 10 meters per product, enabling sophisticated usage tracking across multiple dimensions like API calls, storage, compute time, and custom metrics.
Viktigt att känna till för tillförlitlig ingestion
Följ dessa metoder för att hålla användningsspårningen korrekt och motståndskraftig i produktion.
Använd deterministiska, idempotenta event_ids.event_id måste vara unikt för alla händelser och fungerar som idempotency key — ett återanvänt event_id behandlas som en dubblett och räknas inte igen, så retries aldrig leder till dubbeldebitering. Härled ID:t från åtgärden i stället för att använda ett slumpmässigt värde, t.ex. `${customer_id}_${action}_${timestamp}`.
Batcha händelser, upp till 1 000 per request./events/ingest-endpointen tillämpar ett strikt maximum på 1 000 händelser per anrop; större batchar avvisas, så dela upp stora volymer över flera anrop. För arbetsbelastningar med hög volym bör du buffra händelser och skicka dem i batchar i stället för att skicka ett anrop per händelse.
Försök igen med 5xx och 429, men aldrig med 4xx. Försök igen vid serverfel (5xx) och rate limits (429) med exponentiell backoff. Försök inte igen med valideringsfel för 400/422 — payloaden är felaktigt formaterad och kommer att misslyckas varje gång; korrigera den och skicka den igen. Köa händelser som fortfarande misslyckas efter retries så att inga går förlorade.
Ange timestamps med avsikt. Utelämna timestamp för realtidshändelser, så används ingestion-tiden som standard. Ange det uttryckligen (ISO 8601) vid backfill eller när fördröjda/batchade händelser skickas, så att användningen hamnar i rätt billingperiod.
Skicka aggregerade metadata som tal, inte strängar. Alla properties som refereras av ett mäts Over Property (Sum, Max, Last) måste vara av numerisk typ — { "tokens": 150 }, inte { "tokens": "150" }. Strängvärden aggregeras inte.
Övervaka och analysera dina data för användningsbaserad debitering med en omfattande analytics-dashboard. Följ kundernas konsumtionsmönster, mätarprestanda och debiteringstrender för att optimera din prisstrategi och förstå användningsbeteenden.
Diagrammet över mätarkvantiteter visualiserar användningstrender över tid med följande funktioner:
Tidsserievisualisering: Följ användningsmönster per dag, vecka eller månad
Stöd för flera mätare: Visa data från olika mätare samtidigt
Trendanalys: Identifiera användningstoppar, mönster och tillväxtbanor
Diagrammet skalas automatiskt baserat på din användningsvolym och valda tidsintervall, vilket ger tydlig insyn i både små variationer och stora förändringar i användningen.
Händelsetabellen ger en tydlig bild av enskilda användningshändelser med följande kolumner:
Händelsenamn: Den specifika åtgärd eller trigger som genererade användningshändelsen
Händelse-ID: Unik identifierare för varje händelseinstans
Kund-ID: Kunden som är kopplad till händelsen
Timestamp: När händelsen inträffade
Med den här vyn kan du följa och övervaka enskilda användningshändelser bland dina kunder, vilket ger transparens i debiteringsberäkningar och användningsmönster.