Create a Checkout Session with
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.maximum. By default, an item’s minimum quantity is
0 and the maximum quantity is
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
Checkout prevents the customer from removing an item if it is the only item remaining.
Handling 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 is also removed from the line items response. See the Fulfillment guide to learn how to create an event handler to handle completed Checkout Sessions.