Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
Invoicing
Usage-based billing
    Choose a usage-based billing setup
    Record usage for billing
      Create a meter
      Configure a meter
      Record usage with the API
      Record usage in the Dashboard
      Record usage with S3
      Configure grace period
    Offer billing credits
    Monitor usage
    Usage-based pricing models
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Revenue recognition
Test your integration
Tax
Overview
Use Stripe tax
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports API
Reports for multiple accounts
Revenue recognition
Data
OverviewSchema
Custom reports
Data Pipeline
Data management
HomeRevenueUsage-based billingRecord usage for billing

Create meters

Learn how to create a meter to record customer usage data.

Meters specify how to aggregate meter events over a billing period. Meter events represent all actions that customers take in your system (for example, API requests). Meters attach to prices and form the basis of what’s billed.

For the Alpaca AI example, meter events are the number of tokens a customer uses in a query. The meter is the sum of tokens over a month.

You can use the Stripe Dashboard or API to configure a meter. To use the API with the Stripe CLI to create a meter, get started with the Stripe CLI.

  1. On the Meters page, click Create meter.
  2. On the Create meter page, do the following:
    • For Meter name, enter the name of the meter to display and for organisation purposes. For the Alpaca AI example, enter “Alpaca AI tokens”.
    • For Event name, enter the name to display in meter events when reporting usage to Stripe. For the Alpaca AI example, enter “alpaca_ai_tokens.”
    • Set the appropriate Aggregation method in the dropdown:
      • For the Alpaca AI example, select Sum. This will add up the values reported (in this example, number of tokens a customer uses) to determine the usage to bill for.
      • Choose Count to bill based on the number of events reported.
      • Choose Last to bill based on the last value reported.
      • Use the preview pane to set example usage events and verify the aggregation method.
    • Click Create meter.
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc
Related Guides
Usage-based pricing models
Products Used
Billing