Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Make line item quantities adjustable


Make line item quantities adjustable

Enable your customers to adjust the quantity of items during checkout.

The line items for each Checkout Session keep track of what your customer is purchasing. You can configure the Checkout Session so customers can adjust line item quantities during checkout.

Create a Checkout Session with an adjustable quantity

Set adjustable_quantity on your line_items when creating a Checkout Session to enable your customers to update the quantity of an item during checkout.

You can customize the default settings for the minimum and maximum quantities allowed by setting adjustable_quantity.minimum and adjustable_quantity.maximum. By default, an item’s minimum adjustable quantity is 0 and the maximum adjustable quantity is 99. You can specify a value of up to 999999 for adjustable_quantity.maximum.

When using adjustable quantities with a line_items[].quantity value greater than 99 (the default adjustable maximum), set adjustable_quantity.maximum to be greater than or equal to that item’s quantity.

If you use adjustable quantities, change your configuration so that it uses adjustable_quantity.maximum when creating the Checkout Session to reserve inventory quantity instead of the line_items quantity.

Checkout prevents the customer from removing an item if it’s the only item remaining.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Handle completed transactions

After the payment completes, you can make a request for the finalized line items and their quantities. If your customer removes a line item, it’s also removed from the line items response. See the Fulfillment guide to learn how to create an event handler to handle completed Checkout Sessions.

Note

To test your event handler, install the Stripe CLI and use stripe listen --forward-to localhost:4242/webhook to forward events to your local server.

Select a language

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Last verified 2026-09-24

Is this helpful?