Use Cases
Explore common scenarios supported by the Stream Blueprint:Video Platforms
Bill customers based on video bandwidth consumption and streaming quality.
Music Streaming
Track audio streaming usage per user for subscription tiers.
Live Events
Monitor live stream consumption and charge for bandwidth usage.
Real-Time Data
Track real-time data transfer for IoT and telemetry applications.
Perfect for video/audio streaming platforms, live streaming services, and real-time data applications.
Quick Start
Track streaming bytes consumed by your customers:1
Install the SDK
2
Get Your API Keys
- Dodo Payments API Key: Get it from Dodo Payments Dashboard
3
Create a Meter
Create a meter in your Dodo Payments Dashboard:
- Event Name:
stream_consumption
(or your preferred name) - Aggregation Type:
sum
to track total bytes streamed - Over Property:
bytes
to bill based on bandwidth usage
4
Track Stream Usage
Configuration
Ingestion Configuration
Your Dodo Payments API key from the dashboard.
Environment mode:
test_mode
or live_mode
.Event name that matches your meter configuration.
Track Stream Bytes Options
The customer ID for billing attribution.
Number of bytes consumed in the stream. Required for bandwidth-based billing.
Optional metadata about the stream like stream type, quality, sessionId, etc.
Best Practices
Track by Chunk: For long streams, track consumption in chunks rather than waiting for the entire stream to complete.
Accurate Byte Counting: Ensure byte counts include all overhead (headers, protocol overhead) if billing for total bandwidth.