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.
Ikuti praktik berikut agar pelacakan penggunaan tetap akurat dan tangguh di production.
Gunakan event_id yang deterministik dan idempoten.event_id harus unik di seluruh event dan berfungsi sebagai idempotency key — event_id yang digunakan ulang akan dianggap sebagai duplikat dan tidak dihitung lagi, sehingga retry tidak pernah menyebabkan double-billing. Turunkan ID dari tindakan yang dilakukan, bukan dari nilai acak, misalnya `${customer_id}_${action}_${timestamp}`.
Batch event, hingga 1.000 per request. Endpoint /events/ingest memberlakukan batas maksimum 1.000 event per call; batch yang lebih besar akan ditolak, jadi bagi volume tinggi ke dalam beberapa call. Untuk workload bervolume tinggi, buffer event dan flush dalam batch, bukan mengirim satu request per event.
Lakukan retry pada 5xx dan 429, jangan pada 4xx. Lakukan retry pada server error (5xx) dan rate limit (429) dengan exponential backoff. Jangan melakukan retry pada validation error 400/422 — payload tersebut malformed dan akan selalu gagal; perbaiki lalu kirim ulang. Masukkan event yang masih gagal setelah retry ke dalam queue agar tidak ada yang hilang.
Tetapkan timestamp dengan sengaja. Abaikan timestamp untuk event real-time dan nilainya akan default ke waktu ingestion. Tetapkan secara eksplisit (ISO 8601) saat melakukan backfill atau mengirim event yang tertunda/dibatch agar penggunaan masuk ke periode billing yang benar.
Kirim metadata yang diagregasi sebagai angka, bukan string. Setiap properti yang direferensikan oleh Over Property suatu meter (Sum, Max, Last) harus bertipe numerik — { "tokens": 150 }, bukan { "tokens": "150" }. Nilai string tidak akan diagregasi.
Pantau dan analisis data usage-based billing Anda dengan dashboard analytics yang komprehensif. Lacak pola konsumsi customer, performa meter, dan tren billing untuk mengoptimalkan strategi harga serta memahami perilaku penggunaan.
Grafik kuantitas meter memvisualisasikan tren penggunaan dari waktu ke waktu dengan fitur berikut:
Visualisasi time-series: Lacak pola penggunaan berdasarkan hari, minggu, atau bulan
Dukungan multiple meter: Lihat data dari berbagai meter secara bersamaan
Analisis tren: Identifikasi lonjakan penggunaan, pola, dan lintasan pertumbuhan
Grafik secara otomatis menyesuaikan skala berdasarkan volume penggunaan dan rentang waktu yang dipilih, sehingga memberikan visibilitas yang jelas terhadap fluktuasi kecil maupun perubahan penggunaan yang besar.
Tabel event menyediakan tampilan yang jelas mengenai setiap event penggunaan dengan kolom berikut:
Nama Event: Tindakan atau pemicu spesifik yang menghasilkan event penggunaan
ID Event: Identifier unik untuk setiap instance event
ID Customer: Customer yang terkait dengan event
Timestamp: Waktu terjadinya event
Tampilan ini memungkinkan Anda melacak dan memantau setiap event penggunaan di seluruh customer, serta memberikan transparansi terhadap kalkulasi billing dan pola penggunaan.
Berbagai jenis agregasi digunakan untuk skenario billing yang berbeda. Pilih jenis yang tepat berdasarkan cara Anda ingin mengukur dan membebankan biaya penggunaan.