Set up usage-based billing with rate cardsPrivate preview
Charge customers based on complex pricing models with rate cards and subscriptions.
You can use rate cards to set up usage-based billing and charge your customers as they use your service.
This guide uses a fictional AI company called Alpaca AI to demonstrate how to create a pricing model with rate cards, subscribe a customer to the rate card, and record usage with meters. Alpaca AI offers several different models and services. For example, for their Alpaca-0 model, they charge their customers 0.04 USD per hundred tokens. And for their Alpaca Chat service, they charge 0.02 USD for the first 80 messages, 0.05 USD for the next 100 messages, and so on. They bill their customers at the end of the month in arrears. They can add all of their models and services to one rate card.
Learn more about how rate cards work.
Private preview
Rate cards are currently in private preview and could change in functionality and integration path before they’re generally available to all Stripe users. Sign up here to join the private preview.
Before you begin
Rate cards use API endpoints in the /v2
namespace, such as Rate card subscriptions v2.
Learn more about the /v2 and /v1 namespaces.
Create a rate card
Use the Stripe Dashboard or API to create a rate card that includes different rates for each pricing option.
For example, Alpaca AI creates a rate card with:
- Monthly service interval
- USD currency
- Tax not included in price
- Metered price of 0.04 USD per hundred units
- Monthly billing cadence
You need to associate each rate in a rate card with a meter.
Subscribe your customer to a rate card
After you create rate card, you can start subscribing customers.
When you subscribe your customer to the rate card, you also define the billing cadence–how often to create invoices for your customer. When an invoice is created, the customer’s default payment method is automatically charged.
Record customer usage
After you subscribe a customer to a rate card, you can record their usage of your service, by sending meter events to a meter.