- Breaking change
- API
- Checkout
Checkout sessions always collect an order#
Every checkout session now collects an order, and pays through it. POST /v1/checkout-sessions takes exactly one of order_id, quick_pay_item, or subscription_plan_id.
Breaking: payment_intent_id is no longer a create field, and a request that sends it returns 400 with UNKNOWN_FIELD. Checkout sessions no longer carry a payment_intent_id field; payment_intent_ids still lists the order's PaymentIntents. A checkout session credential no longer reads or confirms a standalone PaymentIntent, and the error codes for PaymentIntent checkouts, such as PAYMENT_INTENT_CHECKOUT_ALREADY_EXISTS, are retired.
To charge an amount on a Flint-hosted page, create the session with quick_pay_item, and Flint creates a one-line order for it. To collect a PaymentIntent you create on its own, use Stripe Elements on your page and confirm through Flint, as Server-confirmed payments describes.
A Return resolution offers a checkout session only for the balance of its replacement Order. A correction that would leave the buyer owing money is rejected, as Return resolutions describes.