What are Pricing Events?
Pricing events are individual records of customer usage that include:- Event name - The type of usage being measured (e.g., “api_call”, “storage_gb”, “seats”)
- Customer identifier - Links the event to a specific customer
- Timestamp - When the usage occurred
- Quantity - The amount of usage (e.g., 1 API call, 50 GB storage)
- Metadata - Additional context like region, product tier, or feature flags
Sending pricing events
You can ingest pricing events through multiple methods:API ingestion
Send events directly to Vayu’s ingestion API:Batch ingestion
For high-volume scenarios, send events in batches to reduce API overhead.Data warehouse integration
Connect your data warehouse to automatically sync usage data to Vayu on a scheduled basis.Event processing
Once ingested, pricing events flow through Vayu’s processing pipeline:- Validation - Events are checked for required fields and data integrity
- Enrichment - Customer and product data is attached to each event
- Aggregation - Events are grouped and summed according to your pricing configuration
- Rating - Aggregated usage is converted to billable amounts based on pricing tiers
- Invoicing - Rated usage appears on customer invoices
Event requirements
Each pricing event must include:- Unique event ID - Prevents duplicate processing (idempotency)
- Customer identifier - Maps to a customer in Vayu
- Event name - Matches a configured pricing metric
- Timestamp - Must be within the acceptable time window
- Quantity - Numeric value representing the usage amount
Best PracticesWhen sending pricing events:
- Send events in real-time - Minimize delay between usage and event ingestion
- Use idempotency keys - Prevent duplicate charges from retry logic
- Include rich metadata - Enable detailed usage analysis and debugging
- Batch when appropriate - Balance real-time visibility with API efficiency
- Monitor ingestion - Track event delivery and processing errors
- Test thoroughly - Verify events are correctly mapped to pricing metrics
Viewing Pricing Events
You can view ingested pricing events in the Vayu dashboard:- Navigate to Usage Data
- Select Events or Measurements
- Filter by customer, date range, or event type
- Review event details and processing status