Learn how to update your integration to use prices for one-time purchases and recurring billing.
The Prices API adds more flexibility to how you charge customers. It also replaces the Plans API, so Stripe recommends migrating your existing integration to work with prices. To migrate, you need to identify how you use plans, products, and payment flows and then update these parts of your integration to use the Prices API.
Use Checkout with custom line_items, items with SKUs, or subscription_data[items] with plan IDs. See the Checkout migration guide to make sure you’re using the latest version of Checkout before working through the rest of this guide.
If you manually create invoice items to bill your customers, replace unit_amount or amount with a price and quantity. For example, if you charge a 20 USD setup fee, you pass the unit_amount and quantity in every /v1/invoiceitems call. Instead, you create a product and a price, and then pass the price in /v1/invoiceitems calls instead.
If you use subscriptions to bill your customers, you can continue to pass plan IDs into the Prices API. Plans are recurring prices, and can be updated and retrieved in the /v1/prices endpoints. You can also pass plan IDs into the various price fields. For example, if you have a plan with ID plan_abc:
If you previously implemented one-time fees on subscriptions by adding invoice items to a customer or subscription, you may continue to do so. You can also pass a price and quantity in add_invoice_items within the Subscriptions API. For example, if you previously included a setup fee when you created subscriptions, you had to create a pending invoice item and create the subscription. You can now do this in a single API call: