- A customer consumed AI LLM tokens
- A customer streamed minutes of video
- A customer uploaded a file to your application
- A
name
, which is a string that can be used to identify the type event. For example,ai_usage
,video_streamed
orfile_uploaded
. - A
customer_id
orexternal_customer_id
, which is the Polar’s customer ID or your user’s ID. This is used to identify the customer that triggered the event. - A
metadata
object, which is a JSON object that can contain any additional information about the event. This is useful for storing information that can be used to filter the events or compute the actual usage. For example, you can store the duration of the video streamed or the size of the file uploaded.
Ingest events using the Polar SDK
To ingest events, you can use the Polar SDKs.TypeScript Example
You are always responsible for checking the balance of your customers’ Usage
Meter. As events always are ingested, we will never prohibit any customer’s
action based on their Usage Meter balance.