Legacy Usage Records
Check out the new Stripe integration to implement usage-based billing with Stripe.
This documentation is for legacy Stripe usage-based
billing
integration that reports usage records to SubscriptionItem
(s) directly.
To report usage records to Stripe legacy usage-based billing, use OpenMeter usage sync:
- Setup OpenMeter usage sync via webhooks
- Report usage to Stripe in your application
1. Setup OpenMeter webhooks
You can set up usage sync on the OpenMeter Cloud UI or via API. For Stripe
integration, we recommend reporting daily
for the last day
usage.
To minimize usage slipping into the next billing period when the plan changes
the billing cycle, you can report hourly
.
See Webhooks to learn more about how to configure and consume OpenMeter webhooks.
2. Report usage to Stripe
To report usage to Stripe, we will listen to OpenMeter usage sync webhooks and report usage to Stripe. The steps are:
- 2.1. Find Stripe subscription for
subject
(customer) - 2.2. Find Stripe subscription item for
meter
- 2.3. Report usage to Stripe
To read more about how to implement the legacy Stripe Usage-Based Pricing, check out our blog posts: