Billing
How subscriptions work
How to model subscriptions
Examples

Billing examples

This page explores some common billing use cases and demonstrates how to model them with products and prices. The following examples follow a fictional company, SqueakyCar, that’s offering a car wash service. Washers come to the customer’s home to wash their cars.

Simple monthly billing

Many businesses begin with a simple monthly rate or “per-seat” pricing. This is modeled by specifying the unit_amount on a Price. Specify a quantity when creating a subscription to charge for multiple seats or licenses.

SqueakyCar’s new car wash service charges $20 per car each month. First, they create a Product to describe what they’re selling—in this case, a weekly car washing service:

curl https://api.stripe.com/v1/products \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d name="Weekly Car Wash Service" \ -d type=service
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Product.create({ name: 'Weekly Car Wash Service', type: 'service', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Product.create( name='Weekly Car Wash Service', type='service', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Product::create([ 'name' => 'Weekly Car Wash Service', 'type' => 'service', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; ProductCreateParams params = ProductCreateParams.builder() .setName("Weekly Car Wash Service") .setType(ProductCreateParams.Type.SERVICE) .build(); Product product = Product.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const product = await stripe.products.create({ name: 'Weekly Car Wash Service', type: 'service', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.ProductParams{ Name: stripe.String("Weekly Car Wash Service"), Type: stripe.String(string(stripe.ProductTypeService)), } p, _ := product.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new ProductCreateOptions { Name = "Weekly Car Wash Service", Type = "service", }; var service = new ProductService(); var product = service.Create(options);

Next, they add a price to the product. The following example shows how to add a price that bills $20 USD per month:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Standard Monthly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=2000 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Standard Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 2000, currency: 'usd', recurring: { interval: 'month', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Standard Monthly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=2000, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Standard Monthly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 2000, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Standard Monthly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(2000L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Standard Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 2000, currency: 'usd', recurring: { interval: 'month', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Standard Monthly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(2000), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Standard Monthly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 2000, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

This example demonstrates how to create a subscription to SqueakyCar’s service for a customer with two cars, specifying price and quantity:

curl https://api.stripe.com/v1/subscriptions \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer="{{CUSTOMER_ID}}" \ -d "items[0][price]"="{{STANDARD_MONTHLY_USD_PRICE_ID}}" \ -d "items[0][quantity]"=2
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Subscription.create({ customer: '{{CUSTOMER_ID}}', items: [ { price: '{{STANDARD_MONTHLY_USD_PRICE_ID}}', quantity: 2, }, ], })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Subscription.create( customer='{{CUSTOMER_ID}}', items=[ { 'price': '{{STANDARD_MONTHLY_USD_PRICE_ID}}', 'quantity': 2, }, ] )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Subscription::create([ 'customer' => '{{CUSTOMER_ID}}', 'items' => [ [ 'price' => '{{STANDARD_MONTHLY_USD_PRICE_ID}}', 'quantity' => 2, ], ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionCreateParams params = SubscriptionCreateParams.builder() .setCustomer("{{CUSTOMER_ID}}") .addItem( SubscriptionCreateParams.Item.builder() .setPrice("{{STANDARD_MONTHLY_USD_PRICE_ID}}") .setQuantity(2L) .build()) .build(); Subscription subscription = Subscription.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const subscription = await stripe.subscriptions.create({ customer: '{{CUSTOMER_ID}}', items: [ { price: '{{STANDARD_MONTHLY_USD_PRICE_ID}}', quantity: 2, }, ], });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionParams{ Customer: stripe.String("{{CUSTOMER_ID}}"), Items: []*stripe.SubscriptionItemsParams{ { Price: stripe.String("{{STANDARD_MONTHLY_USD_PRICE_ID}}"), Quantity: stripe.Int64(2), }, }, } s, _ := sub.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionCreateOptions { Customer = "{{CUSTOMER_ID}}", Items = new List<SubscriptionItemOptions> { new SubscriptionItemOptions { Price = "{{STANDARD_MONTHLY_USD_PRICE_ID}}", Quantity = 2, }, }, }; var service = new SubscriptionService(); var subscription = service.Create(options);

Varying pricing

Products can use multiple prices to define different pricing options. The product description is shared between prices and appears the same on the customer’s receipt and invoice—only the pricing differs.

As SqueakyCar’s product matures, they begin offering the same product at different price points. Specifically, certain customers are willing to pay for discounted up-front quarterly and yearly subscriptions. SqueakyCar creates a quarterly $57 option:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Standard Quarterly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=5700 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[interval_count]"=3 \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Standard Quarterly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 5700, currency: 'usd', recurring: { interval: 'month', interval_count: 3, usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Standard Quarterly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=5700, currency='usd', recurring={ 'interval': 'month', 'interval_count': 3, 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Standard Quarterly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 5700, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'interval_count' => 3, 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Standard Quarterly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(5700L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setIntervalCount(3L), .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Standard Quarterly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 5700, currency: 'usd', recurring: { interval: 'month', interval_count: 3, usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Standard Quarterly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(5700), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), IntervalCount: stripe.Int64(3), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Standard Quarterly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 5700, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", IntervalCount = 3, UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

And a yearly $220 option:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Standard Yearly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=22000 \ -d currency=usd \ -d "recurring[interval]"=year \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Standard Yearly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 22000, currency: 'usd', recurring: { interval: 'year', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Standard Yearly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=22000, currency='usd', recurring={ 'interval': 'year', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Standard Yearly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 22000, 'currency' => 'usd', 'recurring' => [ 'interval' => 'year', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Standard Yearly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(22000L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.YEAR) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Standard Yearly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 22000, currency: 'usd', recurring: { interval: 'year', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Standard Yearly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(22000), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalYear)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Standard Yearly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 22000, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "year", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

As SqueakyCar expands to different markets, such as Canada, they can add prices in different currencies:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Canadian Monthly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=3500 \ -d currency=cad \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Canadian Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 3500, currency: 'cad', recurring: { interval: 'month', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Canadian Monthly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=3500, currency='cad', recurring={ 'interval': 'month', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Canadian Monthly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 3500, 'currency' => 'cad', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Canadian Monthly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(3500L) .setCurrency("cad") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Canadian Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 3500, currency: 'cad', recurring: { interval: 'month', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Canadian Monthly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(3500), Currency: stripe.String(string(stripe.CurrencyCAD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Canadian Monthly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 3500, Currency = "cad", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

And the UK:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="UK Monthly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=1800 \ -d currency=gbp \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'UK Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 1800, currency: 'gbp', recurring: { interval: 'month', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='UK Monthly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=1800, currency='gbp', recurring={ 'interval': 'month', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'UK Monthly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 1800, 'currency' => 'gbp', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("UK Monthly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(1800L) .setCurrency("gbp") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'UK Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 1800, currency: 'gbp', recurring: { interval: 'month', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("UK Monthly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(1800), Currency: stripe.String(string(stripe.CurrencyGBP)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "UK Monthly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 1800, Currency = "gbp", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

Flat fee

You can subscribe the customer to two separate products to model a pricing structure that includes both a base fee and additional per-seat pricing. One product serves as the flat base price and the other product represents the variable per-seat pricing.

SqueakyCar has seen a boom in multi-car households, so they are changing their pricing to introduce a new base fee that they will charge their customers alongside the per-car monthly fee. They create a Product and Price for the base fee:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Monthly Base Fee" \ -d product="{{BASE_FEE_PRODUCT_ID}" \ -d unit_amount=500 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Monthly Base Fee', product: '{{BASE_FEE_PRODUCT_ID}', unit_amount: 500, currency: 'usd', recurring: { interval: 'month', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Monthly Base Fee', product='{{BASE_FEE_PRODUCT_ID}', unit_amount=500, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Monthly Base Fee', 'product' => '{{BASE_FEE_PRODUCT_ID}', 'unit_amount' => 500, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Monthly Base Fee") .setProduct("{{BASE_FEE_PRODUCT_ID}") .setUnitAmount(500L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Monthly Base Fee', product: '{{BASE_FEE_PRODUCT_ID}', unit_amount: 500, currency: 'usd', recurring: { interval: 'month', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Monthly Base Fee"), ProductID: stripe.String("{{BASE_FEE_PRODUCT_ID}"), UnitAmount: stripe.Int64(500), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Monthly Base Fee", Product = "{{BASE_FEE_PRODUCT_ID}", UnitAmount = 500, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

And a monthly price that charges $15 per car:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Per Car Monthly" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=1500 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=licensed
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Per Car Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 1500, currency: 'usd', recurring: { interval: 'month', usage_type: 'licensed', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Per Car Monthly', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=1500, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'licensed', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Per Car Monthly', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 1500, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'licensed', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Per Car Monthly") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(1500L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.LICENSED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Per Car Monthly', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 1500, currency: 'usd', recurring: { interval: 'month', usage_type: 'LICENSED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Per Car Monthly"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(1500), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeLicensed)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Per Car Monthly", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 1500, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "licensed", }, }; var service = new PriceService(); var price = service.Create(options);

The following example demonstrates how to subscribe a customer with three cars to the base fee price and the per-car price:

curl https://api.stripe.com/v1/subscriptions \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer="{{CUSTOMER_ID}}" \ -d "items[0][price]"="{{base_fee_price_id}}" \ -d "items[0][quantity]"=1 \ -d "items[1][price]"="{{per_car_price_id}}" \ -d "items[1][quantity]"=3
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Subscription.create({ customer: '{{CUSTOMER_ID}}', items: [ { price: '{{base_fee_price_id}}', quantity: 1, }, { price: '{{per_car_price_id}}', quantity: 3, }, ], })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Subscription.create( customer='{{CUSTOMER_ID}}', items=[ { 'price': '{{base_fee_price_id}}', 'quantity': 1, }, { 'price': '{{per_car_price_id}}', 'quantity': 3, }, ] )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Subscription::create([ 'customer' => '{{CUSTOMER_ID}}', 'items' => [ [ 'price' => '{{base_fee_price_id}}', 'quantity' => 1, ], [ 'price' => '{{per_car_price_id}}', 'quantity' => 3, ], ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionCreateParams params = SubscriptionCreateParams.builder() .setCustomer("{{CUSTOMER_ID}}") .addItem( SubscriptionCreateParams.Item.builder() .setPrice("{{base_fee_price_id}}") .setQuantity(1L) .build()) .addItem( SubscriptionCreateParams.Item.builder() .setPrice("{{per_car_price_id}}") .setQuantity(3L) .build()) .build(); Subscription subscription = Subscription.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const subscription = await stripe.subscriptions.create({ customer: '{{CUSTOMER_ID}}', items: [ { price: '{{base_fee_price_id}}', quantity: 1, }, { price: '{{per_car_price_id}}', quantity: 3, }, ], });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionParams{ Customer: stripe.String("{{CUSTOMER_ID}}"), Items: []*stripe.SubscriptionItemsParams{ { Price: stripe.String("{{base_fee_price_id}}"), Quantity: stripe.Int64(1), }, { Price: stripe.String("{{per_car_price_id}}"), Quantity: stripe.Int64(3), }, }, } s, _ := sub.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionCreateOptions { Customer = "{{CUSTOMER_ID}}", Items = new List<SubscriptionItemOptions> { new SubscriptionItemOptions { Price = "{{base_fee_price_id}}", Quantity = 1, }, new SubscriptionItemOptions { Price = "{{per_car_price_id}}", Quantity = 3, }, }, }; var service = new SubscriptionService(); var subscription = service.Create(options);

This results in a $50 charge every month: the $5 base monthly rate, plus $15 each for 3 cars.

Usage-based pricing

Metered billing is useful in cases where you want to charge your customers a granular amount based on their consumption of your service during the billing cycle, instead of explicitly setting quantities. For example, SqueakyCar can use metered billing to offer a service where they wash their customer’s cars as needed, and charge at the end of the month for the total number of washes.

The following example shows how to set the value of usage_type to create a price with metered billing. In this case, they charge $7 per car wash:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Metered Monthly Plan" \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d unit_amount=700 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=metered
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Metered Monthly Plan', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 700, currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Metered Monthly Plan', product='{{CAR_WASH_PRODUCT_ID}}', unit_amount=700, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'metered', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Metered Monthly Plan', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'unit_amount' => 700, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'metered', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Metered Monthly Plan") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setUnitAmount(700L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.METERED) .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Metered Monthly Plan', product: '{{CAR_WASH_PRODUCT_ID}}', unit_amount: 700, currency: 'usd', recurring: { interval: 'month', usage_type: 'METERED', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Metered Monthly Plan"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), UnitAmount: stripe.Int64(700), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeMetered)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Metered Monthly Plan", Product = "{{CAR_WASH_PRODUCT_ID}}", UnitAmount = 700, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "metered", }, }; var service = new PriceService(); var price = service.Create(options);

Metered billing can also be applied in situations where the unit you are measuring is not strictly based on a sum. For example, imagine that in addition to car washing, SqueakyCar also rents out garage parking spots to their customers, and wants to charge for the maximum number of parking spots used per customer per month. SqueakyCar can configure this with the aggregate_usage parameter.

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Monthly Parking Plan" \ -d product="{{CAR_PARKING_PRODUCT_ID}}" \ -d unit_amount=20000 \ -d currency=usd \ -d "recurring[interval]"=month \ -d "recurring[usage_type]"=metered \ -d "recurring[aggregate_usage]"=max
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Monthly Parking Plan', product: '{{CAR_PARKING_PRODUCT_ID}}', unit_amount: 20000, currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', aggregate_usage: 'max', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Monthly Parking Plan', product='{{CAR_PARKING_PRODUCT_ID}}', unit_amount=20000, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'metered', 'aggregate_usage': 'max', }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Monthly Parking Plan', 'product' => '{{CAR_PARKING_PRODUCT_ID}}', 'unit_amount' => 20000, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'metered', 'aggregate_usage' => 'max', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Monthly Parking Plan") .setProduct("{{CAR_PARKING_PRODUCT_ID}}") .setUnitAmount(20000L) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval(PriceCreateParams.Interval.MONTH) .setUsageType(PriceCreateParams.UsageType.METERED) .setAggregateUsage(PriceCreateParams.AggregateUsage.MAX), .build()); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Monthly Parking Plan', product: '{{CAR_PARKING_PRODUCT_ID}}', unit_amount: 20000, currency: 'usd', recurring: { interval: 'month', usage_type: 'METERED', aggregate_usage: 'MAX', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Monthly Parking Plan"), ProductID: stripe.String("{{CAR_PARKING_PRODUCT_ID}}"), UnitAmount: stripe.Int64(20000), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeMetered)), AggregateUsage: stripe.String(string(stripe.PriceRecurringAggregateUsageMax)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PriceCreateOptions { Nickname = "Monthly Parking Plan", Product = "{{CAR_PARKING_PRODUCT_ID}}", UnitAmount = 20000, Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "metered", AggregateUsage = "max", }, }; var service = new PriceService(); var price = service.Create(options);

Imagine that a customer has two cars parked on June 1st, then parks a third car on the 15th, and later removes one of the first two cars on the 20th. The billed amount at the end of the month is $600 (three cars maximum usage during the month, charging $200 per car).

Usage-based pricing can also be combined with flat fees (as shown above) to charge a flat monthly rate in addition to charging for usage over the billing cycle.

Pricing tiers

Prices can represent tiers, allowing the unit cost to change with quantity or usage. SqueakyCar might, for example, want to offer lower rates for customers who use more washes per month. The following examples show two different ways to adjust pricing as usage increases: volume-based pricing and graduated pricing. To demonstrate these approaches to tiered pricing, we will use the following tiers:

Number of car washes Price per wash
1 - 5 $7
6 - 10 $6.50
11+ $6

Volume-based pricing

With volume-based pricing, the subscription item is billed at the tier corresponding to the amount of usage at the end of the period. To implement volume-based billing tiers, set volume as the value of tiers_mode:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Car Wash Volume Pricing" \ -d "tiers[0][unit_amount]"=700 \ -d "tiers[0][up_to]"=5 \ -d "tiers[1][unit_amount]"=650 \ -d "tiers[1][up_to]"=10 \ -d "tiers[2][unit_amount]"=600 \ -d "tiers[2][up_to]"=inf \ -d currency=usd \ -d "recurring[interval]"=month \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d tiers_mode=volume \ -d billing_scheme=tiered \ -d "recurring[usage_type]"=metered \ -d "expand[]"=tiers
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Car Wash Volume Pricing', product: '{{CAR_WASH_PRODUCT_ID}}', currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, billing_scheme: 'tiered', tiers_mode: 'volume', tiers: [ { unit_amount: 700, up_to: '5', }, { unit_amount: 650, up_to: '10', }, { unit_amount: 600, up_to: 'inf', }, ], expand: ['tiers'], })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Car Wash Volume Pricing', product='{{CAR_WASH_PRODUCT_ID}}', currency='usd', recurring={ 'interval': 'month', 'usage_type': 'metered', }, billing_scheme='tiered', tiers_mode='volume', tiers=[ { 'unit_amount': 700, 'up_to': '5', }, { 'unit_amount': 650, 'up_to': '10', }, { 'unit_amount': 600, 'up_to': 'inf', }, ], expand=['tiers'], )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Car Wash Volume Pricing', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'metered', ], 'billing_scheme' => 'tiered', 'tiers_mode' => 'volume', 'tiers' => [ [ 'unit_amount' => 700, 'up_to' => '5', ], [ 'unit_amount' => 650, 'up_to' => '10', ], [ 'unit_amount' => 600, 'up_to' => 'inf', ] ], 'expand' => ['tiers'], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Car Wash Volume Pricing") .setProduct("{{ CAR_WASH_PRODUCT_ID }}") .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval("month") .setUsageType("metered") .build()) .setBillingScheme("tiered") .setTiersMode("volume") .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(700) .setUpTo("5") .build()) .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(650) .setUpTo("10") .build()) .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(600) .setUpTo("inf") .build()) .addExpand("tiers") .build(); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Car Wash Volume Pricing', product: '{{CAR_WASH_PRODUCT_ID}}', currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, billing_scheme: 'tiered', tiers_mode: 'volume', tiers: [ { unit_amount: 700, up_to: 5, }, { unit_amount: 650, up_to: 10, }, { unit_amount: 600, up_to: 'inf', }, ], expand: ['tiers'], });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Car Wash Volume Pricing"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceRecurringIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeMetered)), }, BillingScheme: stripe.String(string(stripe.PriceBillingSchemeTiered)), TiersMode: stripe.String(stripe.String(stripe.PriceTiersModeVolume)), Tiers: []*stripe.PriceTier{ { UnitAmount: 700, UpTo: "5", }, { UnitAmount: 650, UpTo: "10", }, { UnitAmount: 600, UpTo: "inf", }, }, } params.AddExpand("tiers") p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var tiers = new List<PriceTierOptions> { new PriceTierOptions { UnitAmount = 700, UpTo = 5, }, new PriceTierOptions { UnitAmount = 650, UpTo = 10, }, new PriceTierOptions { UnitAmount = 600, UpTo = PriceTierUpTo.Inf, }, }; var priceOptions = new PriceCreateOptions { Nickname = "Car Wash Volume Pricing", Product = "{{CAR_WASH_PRODUCT_ID}}", Recurring = new PriceRecurringOptions { Interval = "month", Currency = "usd", }, UsageType = "metered", BillingScheme = "tiered", TiersMode = "volume", Tiers = tiers, }; priceOptions.addExpand("tiers"); var priceService = new PriceService(); var price = priceService.Create(priceOptions);

Under volume-based pricing, a customer with 5 car washes is charged $35 at the end of the period: $7 for each of the 5 washes. However, if they accumulate 6 washes the following month, then all washes are billed at the 6-10 rate. That month, they are charged $39 ($6.50 × 6).

Graduated pricing

While similar to volume pricing, graduated pricing charges for the usage in each tier instead of applying a single price to all usage. Set the value of tiers_mode to graduated to use graduated tiers:

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Car Wash Graduated Pricing" \ -d "tiers[0][unit_amount]"=700 \ -d "tiers[0][up_to]"=5 \ -d "tiers[1][unit_amount]"=650 \ -d "tiers[1][up_to]"=10 \ -d "tiers[2][unit_amount]"=600 \ -d "tiers[2][up_to]"=inf \ -d currency=usd \ -d "recurring[interval]"=month \ -d product="{{CAR_WASH_PRODUCT_ID}}" \ -d tiers_mode=graduated \ -d billing_scheme=tiered \ -d "recurring[usage_type]"=metered \ -d "expand[]"=tiers
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Car Wash Graduated Pricing', product: '{{CAR_WASH_PRODUCT_ID}}', currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, billing_scheme: 'tiered', tiers_mode: 'graduated', tiers: [ { unit_amount: 700, up_to: '5', }, { unit_amount: 650, up_to: '10', }, { unit_amount: 600, up_to: 'inf', }, ], expand: ['tiers'], })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Car Wash Graduated Pricing', product='{{CAR_WASH_PRODUCT_ID}}', currency='usd', recurring={ 'interval': 'month', 'usage_type': 'metered', }, billing_scheme='tiered', tiers_mode='graduated', tiers=[ { 'unit_amount': 700, 'up_to': '5', }, { 'unit_amount': 650, 'up_to': '10', }, { 'unit_amount': 600, 'up_to': 'inf', }, ], expand=['tiers'], )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Car Wash Graduated Pricing', 'product' => '{{CAR_WASH_PRODUCT_ID}}', 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'metered', ], 'billing_scheme' => 'tiered', 'tiers_mode' => 'graduated', 'tiers' => [ [ 'unit_amount' => 700, 'up_to' => '5', ], [ 'unit_amount' => 650, 'up_to' => '10', ], [ 'unit_amount' => 600, 'up_to' => 'inf', ] ], 'expand' => ['tiers'], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Car Wash Graduated Pricing") .setProduct("{{CAR_WASH_PRODUCT_ID}}") .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval("month") .setUsageType("metered") .build()) .setBillingScheme("tiered") .setTiersMode("graduated") .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(700) .setUpTo("5") .build()) .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(650) .setUpTo("10") .build()) .addTier( PriceCreateParams.Tier.builder() .setUnitAmount(600) .setUpTo("inf") .build()) .addExpand("tiers") .build(); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Car Wash Graduated Pricing', product: '{{CAR_WASH_PRODUCT_ID}}', currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, billing_scheme: 'tiered', tiers_mode: 'graduated', tiers: [ { unit_amount: 700, up_to: 5, }, { unit_amount: 650, up_to: 10, }, { unit_amount: 600, up_to: 'inf', }, ], expand: ['tiers'], });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Car Wash Graduated Pricing"), ProductID: stripe.String("{{CAR_WASH_PRODUCT_ID}}"), Recurring: &stripe.PriceRecurringParams{ Currency: stripe.String(string(stripe.CurrencyUSD)), Interval: stripe.String(string(stripe.PriceRecurringIntervalMonth)), }, UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeMetered)), BillingScheme: stripe.String(string(stripe.PriceBillingSchemeTiered)), TiersMode: stripe.String(stripe.String(stripe.PriceTiersModeGraduated)), Tiers: []*stripe.PriceTier{ { UnitAmount: 700, UpTo: "5", }, { UnitAmount: 650, UpTo: "10", }, { UnitAmount: 600, UpTo: "inf", }, }, } params.AddExpand("tiers") p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var tiers = new List<PriceTierOptions> { new PriceTierOptions { UnitAmount = 700, UpTo = 5, }, new PriceTierOptions { UnitAmount = 650, UpTo = 10, }, new PriceTierOptions { UnitAmount = 600, UpTo = PriceTierUpTo.Inf, }, }; var priceOptions = new PriceCreateOptions { Nickname = "Car Wash Graduated Pricing", Product = "{{CAR_WASH_PRODUCT_ID}}", Currency = "usd", Recurring = new PriceRecurringOptions { Interval = "month", UsageType = "metered", }, BillingScheme = "tiered", TiersMode = "graduated", Tiers = tiers, }; priceOptions.addExpand("tiers"); var priceService = new PriceService(); var price = priceService.Create(priceOptions);

With graduated pricing, 5 car washes result in the same charge as volume-based pricing—$35 total at $7 per wash. This changes as usage breaks out of the first tier. A customer with more than 5 washes is charged $7 per wash for the first 5 washes, then $6.50 for washes 6 through 10, and finally $6 per wash thereafter. A customer with 6 car washes would be charged $41.50, $35 for the first 5 washes and $6.50 for the 6th wash.

Transforming usage

Use the transform_usage option to aggregate usage before multiplying by unit cost. This is useful if you want to report a different quantity or usage before totaling price.

SqueakyCar decided to expand their car wash offerings with a premium waxing service. Car waxing can be time consuming, so they charge an extra usage fee (another Product) based on the time washers spend waxing the car. Washers report the exact amount of time spent waxing the cars, but SqueakyCar doesn’t want to charge customers by the minute. Instead, they will charge for each hour spent waxing—even a partial hour.

First, create the premium waxing product:

curl https://api.stripe.com/v1/products \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d name="Premium Wax Service" \ -d unit_label="Hour(s)" \ -d type=service
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Product.create({ name: 'Premium Wax Service', unit_label: 'Hour(s)', type: 'service', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Product.create( name='Premium Wax Service', unit_label='Hour(s)', type='service', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Product::create([ 'name' => 'Premium Wax Service', 'unit_label' => 'Hour(s)', 'type' => 'service', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; ProductCreateParams params = ProductCreateParams.builder() .setName("Premium Wax Service") .setUnitLabel("Hour(s)") .setType("service") .build(); Product product = Product.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const product = await stripe.products.create({ name: 'Premium Wax Service', unit_label: 'Hour(s)', type: 'service', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.ProductParams{ Name: stripe.String("Premium Wax Service"), UnitLabel: stripe.String("Hour(s)"), Type: stripe.String(string(stripe.ProductTypeService)), } prod, _ := product.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var productService = new ProductService(); var options = new ProductCreateOptions { Name = "Premium Wax Service", UnitLabel = "Hour(s)", Type = "service", }; var product = productService.Create(options);

Next, price the waxing service, charging $5 an hour and rounding up (to charge for a full hour even if only part of the hour is used):

curl https://api.stripe.com/v1/prices \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d nickname="Hours Waxing Rate" \ -d unit_amount=500 \ -d currency=usd \ -d "recurring[interval]"=month \ -d product="{{WAX_SERVICE_PRODUCT_ID}}" \ -d "transform_quantity[divide_by]"=60 \ -d "transform_quantity[round]"=up \ -d "recurring[usage_type]"=metered
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Price.create({ nickname: 'Hours Waxing Rate', product: '{{WAX_SERVICE_PRODUCT_ID}}', unit_amount: 500, currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, transform_quantity: { divide_by: 60, round: 'up', }, })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Price.create( nickname='Hours Waxing Rate', product='{{WAX_SERVICE_PRODUCT_ID}}', unit_amount=500, currency='usd', recurring={ 'interval': 'month', 'usage_type': 'metered', }, transform_quantity={ 'divide_by': 60, 'round': 'up' }, )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Price::create([ 'nickname' => 'Hours Waxing Rate', 'product' => '{{WAX_SERVICE_PRODUCT_ID}}', 'unit_amount' => 500, 'currency' => 'usd', 'recurring' => [ 'interval' => 'month', 'usage_type' => 'metered', ], 'transform_quantity' => [ 'divide_by' => 60, 'round' => 'up', ], ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PriceCreateParams params = PriceCreateParams.builder() .setNickname("Hours Waxing Rate") .setProduct("{{WAX_SERVICE_PRODUCT_ID}}") .setUnitAmount(500) .setCurrency("usd") .setRecurring( PriceCreateParams.Recurring.builder() .setInterval("month") .setUsageType("metered") .build()) .setTransformQuantity( PriceCreateParams.TransformQuantity.builder() .setDivideBy("60") .setRound("up") .build()) .build(); Price price = Price.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const price = await stripe.prices.create({ nickname: 'Hours Waxing Rate', product: '{{WAX_SERVICE_PRODUCT_ID}}', unit_amount: 500, currency: 'usd', recurring: { interval: 'month', usage_type: 'metered', }, transform_quantity: { divide_by: 60, round: 'up', }, });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PriceParams{ Nickname: stripe.String("Hours Waxing Rate"), ProductID: stripe.String("{{WAX_SERVICE_PRODUCT_ID}}"), UnitAmount: stripe.Int64(500), Currency: stripe.String(string(stripe.CurrencyUSD)), Recurring: &stripe.PriceRecurringParams{ Interval: stripe.String(string(stripe.PriceRecurringIntervalMonth)), UsageType: stripe.String(string(stripe.PriceRecurringUsageTypeMetered)), }, TransformQuantity: []*stripe.PriceTransformQuantityParams{ DivideBy: stripe.Int64(60), Round: stripe.String(string(stripe.PriceTransformQuantityRoundUp)), }, } p, _ := price.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var priceOptions = new PriceCreateOptions { Nickname = "Hours Waxing Rate", Product = "{{WAX_SERVICE_PRODUCT_ID}}", UnitAmount = 500, Interval = "month", Recurring = new PriceRecurringOptions { Currency = "usd", UsageType = "metered", }, TransformQuantity = new new PriceTransformQuantityOptions { DivideBy = 60, Round = "up", }, }; var priceService = new PriceService(); var price = priceService.Create(priceOptions);

If a washer spends 150 minutes waxing a customer’s cars, that customer would be charged $15 for 3 hours of waxing (2 hours and 30 minutes, rounded up).

Was this page helpful?
Questions? Contact us.
Developer tutorials on YouTube.
You can unsubscribe at any time. Read our privacy policy.