Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
Invoicing
Usage-based billing
Advanced usage-based billing
    Overview
    Get started
    How advanced usage-based billing works
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Test your integration
Tax
Overview
Use Stripe tax
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports for multiple accounts
Reports API
Revenue recognition
Data
Overview
Query business data
Sigma
Data Pipeline
Import external data
United States
English (United States)
HomeRevenueAdvanced usage-based billing

How advanced usage-based billing worksPrivate preview

Learn how you can launch common usage-based pricing models on Stripe.

SaaS and AI businesses often want to charge customers based on the usage of their product while also charging recurring fees up front and offering recurring credits. With advanced usage-based billing, you can:

  • Define and charge customers based on specific usage data attributes (dimensions)
  • Manage dozens to hundreds of rates across one or many meters
  • Set up real-time credit burndown and automate credit issuance
  • Manage price migrations

Supported pricing models include:

  • Pay as you go
  • Flat fee and overages
  • Real-time credit burndown with top-ups

With advanced usage-based billing, you charge customers based on the usage of their product while also charging flat recurring fees and burning down credits.

Advanced usage-based billing concepts

Here are the key concepts for understanding how advanced usage-based billing works.

Billable item A line item that appears on an invoice that corresponds to a pricing plan subscription. Can be metered or licensed.
License feeA fixed, recurring charge for a billable item, such as a monthly subscription fee. It includes details such as price, billing frequency, and tax behavior. Learn more about license fees.
Licensed item A billable item that’s licensed and appears on the invoice sent to your customer. You pass in the ID of the licensed item when you create the license fee.
Meter Meters specify how to aggregate meter events over a service interval. Meter events represent all actions that customers take in your system (for example, API requests). Metered items attach to meters and form the line items for what’s billed. For example, a business offering AI services might have meter events that represent the number of tokens a customer uses in a query. The meter tracks the sum of tokens over a month. The aggregated usage forms the basis for the invoices generated for each billing interval. You can use the Stripe Dashboard or API to configure a meter.
Metered itemA billable item that’s metered. You can create a metered item to represent the specific item that the customer is paying for, such as an LLM model or tier of token usage. You can apply a metered item to multiple rate card rates. Each metered item must be associated with a meter.
Pricing planA customizable container of pricing components (such as rate cards, license fees, and recurring credit grants). Learn more about pricing plans.
Pricing plan subscriptionsA pricing plan subscription is created when a customer is subscribed to a specific pricing plan version. Learn more about pricing plan subscriptions.
RateThe pricing configuration for a metered item in a rate card. Learn more about rate cards and rates.
Rate cardA collection of usage-based rates for a product. Learn more about rate cards.
Service actionDefines a recurring credit grant and applicable billable items. Learn more about service actions.
Service interval Service intervals define two things: the time period for evaluating the usage of your service against your pricing model and when your customer should have access to the service. If you’ve configured volume or graduated pricing (for example, offering the first 100 units free), the limits reset for each service interval.

Pricing plan concepts

You use pricing plans to group a set of pricing components into a single package that you can charge for. You subscribe customers to one pricing plan that contains one or more components for usage-based pricing, recurring fees, or recurring credits. You can modify existing components or add new ones to pricing plans to create new versions of that plan and choose whether to migrate existing customers to the latest version or not.

A pricing plan can contain any combination of:

  • A rate card
  • A license fee
  • A service action

Here’s what a pricing plan looks like with all of its components.

Example image of a pricing plan with a rate card, license fee, and service action

A pricing plan with a rate card, license fee, and service action.

Here’s an example of what a complete pricing plan looks like with Checkout. Learn how to use Checkout to subscribe customers to a pricing plan.

Pricing plan example

A pricing plan displayed in Stripe Checkout

Pricing planA customizable container of pricing components (such as rate cards, license fees, and recurring credit grants) that defines how you bill for your service. For example, you can create a pricing plan that includes rate cards for usage-based billing, license fees for recurring charges, and service actions for recurring credit grant allocations. When a customer subscribes to a pricing plan, all the recurring components are automatically enrolled and billed according to the cadence you configure.
Pricing plan component A part of the pricing plan, such as a rate card, license fee, or service action. Each component has a version to ensure that they’re used consistently in pricing plans. If you don’t specify a component version when you attach it to the pricing plan, the default version is used.
Pricing plan subscriptionA pricing plan subscription is created when a customer is subscribed to a specific pricing plan version. Subscriptions generate and charge customers according to an underlying billing cadence.
Pricing plan versionA pricing plan version is a versioned snapshot of a pricing plan. When you create a pricing plan, you need to set a live version before you can activate the plan or subscribe customers to it. Modifying or deleting existing components creates a new version. Adding a license fee or service action creates a new version. Adding a rate card doesn’t create a new version. When subscribing customers, you can specify a version or let Stripe assign the current live version. Customers stay on their assigned version unless manually changed, which lets you set different pricing for new and existing customers.

Pricing plan versioning

Pricing plans support versioning to manage changes to your billing structure over time. Each version of a pricing plan is immutable. When you update a pricing plan by modifying or deleting existing components, a new version is created. Adding a license fee or service action creates a new version. Adding a rate card doesn’t create a new version. This versioning system helps you:

  • Schedule and communicate pricing changes to customers.
  • Manage different pricing for various customer segments.
  • Track and maintain a history of your pricing models.

Each pricing plan has two version properties:

  • latest_version: This is the most recent version after updates.
  • live_version: This is the version used by default for new subscriptions unless a specific version is provided.

Pricing plan subscription concepts

Here are the key concepts for understanding how pricing plan subscriptions work.

Billing interval (cadence)

A billing interval defines when you send and generate invoices. The generated invoice only consolidates charges that have accrued during one or more service intervals. You can configure different billing intervals to match your business model. For example:

  • Monthly: The customer receives a monthly invoice for all service usage in the previous month.
  • Quarterly: Usage fees accrue monthly, but you only generate invoices once every 3 months.
  • Annual: You bill the customer once a year for all services used during that year.

Billing intervals belong to customers—one billing interval has one customer. (Each customer can have multiple billing intervals.)

Pricing plan subscriptionsA pricing plan subscription is created when a customer is subscribed to a specific pricing plan version. Subscriptions generate and charge customers according to an underlying billing cadence.

Rate card concepts

Here are the key concepts for understanding how rate cards work.

DimensionDimensions let you create usage-based pricing models that vary based on one or more properties. You can specify dimensions when you create a meter or metered item, or submit usage.
Rate card A rate card is a collection of usage-based rates, representing a product. You can subscribe customers to a rate card by creating a pricing plan subscription that’s associated with a billing interval.
Rate card rate A rate card rate is the pricing configuration for a metered item in a rate card. The rate defines the price type (fixed rate, volume, graduated, or overage), price amount, and quantity configuration (you can sell individual units or packages of units). Each rate card can contain multiple rates (up to 500).
Rate card version A rate card version is a versioned snapshot of a rate card. When you create a rate card, an initial live version is set as the default for new subscribers. Modifying or deleting existing rates creates a new version; adding new rates doesn’t create a new version. When subscribing customers, you can specify a version or let Stripe assign the current live version. Customers stay on their assigned version unless manually changed, which lets you set different pricing for new and existing customers.

License fee concepts

License feeA license fee is a fixed, recurring charge for a billable item, such as a monthly subscription fee. It includes details such as price, billing frequency, and tax behavior.
License fee versionA snapshot of the license fee. When you create a license fee, an initial live version is set as the default for new subscribers. When you add a license fee to a pricing plan, you can specify a version or let Stripe assign the current live version. Attaching or updating a license fee to a pricing plan increments the pricing plan version. You can make additional changes to the pricing plan, or set the new pricing plan live version.

Service action concepts

Service action A service action defines a recurring credit grant, specifying the amount, billing frequency, and applicable billable items. This credit can reduce charges for specific items, such as usage-based fees.
Type The specific recurring action you create. (Currently, only credit_grant is supported.)

Lifecycle

Here’s what the lifecycle of a pricing plan looks like:

  1. You create the pricing plan, which can include rate cards, license fees, and service actions.
  2. Subscribe a customer to the pricing plan using Checkout or the API.
  3. Usage is recorded and aggregated for each service interval.
  4. An invoice is created for the subscription according to the billing interval.
  5. The customer’s payment method is charged.

Billing interval and service interval

The billing interval defines when you generate invoices. The generated invoice consolidates charges that have accrued during one or more service intervals. You can configure different billing intervals to match your business model and pricing structures. You must configure the service interval to be shorter than the billing interval. For example, you can configure a weekly service interval on a monthly cadence but not a monthly service interval on a weekly cadence.

When a service interval ends, Stripe calculates charges based on usage and recurring fees during that period (for example, a customer’s usage for the past week). These charges are added to the customer’s account but isn’t necessarily billed immediately.

When a billing interval ends, all accrued charges since the last billing interval are compiled into an invoice and sent to the customer.

This separation allows for flexible billing arrangements, such as monthly service measurement with yearly invoicing, or daily service measurement with weekly billing.

Examples

Customers are only billed for completed service intervals. If a customer is billed while a service interval is still accruing usage, the pricing plan subscription only includes the usage from the previous service interval. Any new usage is added to the invoice for the next billing interval.

License fees are billed in advance for any service interval that started during the billing interval.

Service interval of 5 months with an annual billing interval

In this example, a business has the following setup:

  • Service interval: Every 5 months
  • Billing interval: Every year on March 31

The customer is only billed for the completed service intervals within the annual billing interval. In this example, the invoice is for 10 months of usage, representing the two completed service intervals.

Diagram illustrating how a 5-month service interval is invoiced on an annual billing interval.

With a 5-month service interval and annual billing interval, the customer is only billed for the completed service intervals.

Set up a separate billing interval and service interval

You can provide customers with more frequent usage periods by assessing usage on a weekly basis (this is the service interval). However, to reduce administrative overhead, you might only want to generate invoices on a monthly basis (this is the billing interval).

Defining the service interval and billing interval separately gives you the flexibility to aggregate usage and provision access at one frequency (for example, weekly) but bill customers at another (for example, monthly). This can help to optimize your cash flow.

To set up a separate billing interval and service interval in the Dashboard:

  1. Create a rate card.
  2. Define a service interval that determines how often usage is aggregated (for example, weekly).
  3. Subscribe a customer to a rate card.
  4. Define a billing interval that determines how often invoices are generated (for example, monthly—this doesn’t have to be the same frequency as the service interval).

Revenue Recognition

Revenue Recognition for usage-based billing ensures that you have accurate financial reporting while enabling your AI or SaaS business to leverage flexible, consumption-based pricing models. It follows a delivery-based approach where revenue is recognized when the service is actually delivered or consumed, not when it’s sold or invoiced.

Revenue Recognition has two key components:

  • Sales transaction: Records the sale of usage-based services and when the service was actually consumed.
  • Invoice line items: Records when the customer was billed.

How revenue recognition works with usage-based billing

With usage-based billing, revenue recognition has three main stages:

  • Revenue accrual: Revenue is recognized at the time of delivery, based on the actual consumption of services.
  • Revenue reversal: When invoices are finalized, a revenue reversal on the original revenue accrual occurs. This step is essential for ensuring the revenue recognition accurately reflects the amounts billed to the customer.
  • Rebooking the invoice: When the invoice is finalized, rebooking the invoice involves recognizing the actual treatment against the invoiced amount.

Example

In this example, a customer consumes 100 USD worth of API calls over 3 months, then gets billed:

  • January (Revenue accrual): In the first month, they consume 40 USD worth of API calls.
  • February (Revenue accrual): In the second month, they consume 35 USD worth of API calls.
  • March (Revenue accrual): In the third month, they consume 25 USD worth of API calls.
  • April (Revenue reversal and rebooking of the invoice): After three months, the customer receives an invoice for 100 USD (their total usage).
  • May (Payment): The customer pays the invoice of 100 USD.
AccountJan 2025Feb 2025Mar 2025Apr 2025May 2025Total
Revenue+40 USD+35 USD+25 USD+100 USD
Unbilled AR+40 USD+35 USD+25 USD-100 USD
AR+100 USD-100 USD
Cash+100 USD+100 USD

Limitations

Using Revenue Recognition with usage-based billing has the following limitations during private preview:

  • Meters using last or max aggregation types are currently not supported.
  • Advanced usage-based billing uses billable_items, which aren’t fully supported in the current reports.
  • Journal entries for usage-based billing transactions display the billable_item ID as the product ID. However, product details such as product name, description, and other attributes appear empty in reports.

Automatic tax

You can enable automatic tax on pricing plan subscriptions by using Stripe Checkout or by directly using the API.

Command Line
cURL
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Version: 2025-09-30.preview;checkout_product_catalog_preview=v1" \ -d customer={{CUSTOMER_ID}} \ -d "checkout_items[0][type]"=pricing_plan_subscription_item \ -d "checkout_items[0][pricing_plan_subscription_item][pricing_plan]"={{PRICING_PLAN_ID}} \ -d "checkout_items[0][pricing_plan_subscription_item][component_configurations][{{LICENSE_COMPONENT_ID}}][type]"=license_fee_component \ -d "checkout_items[0][pricing_plan_subscription_item][component_configurations][{{LICENSE_COMPONENT_ID}}][license_fee_component][quantity]"=1 \ -d "automatic_tax[enabled]"=true
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc