Rebasely Beta: data may be purged

examples/storefront Public

YAML · 15 lines · 1.0 KiB · at 582fe0a

title: Checking out a cartdescription: >-  The shopper checks out an open cart. storefront-api takes the stock and creates the order in one  D1 batch, then asks Stripe for a PaymentIntent and hands its client secret to the browser, which  confirms the payment with the Payment Element.actors: [shopper]steps:  - { from: shopper, to: storefront-api, label: "POST /carts/:id/checkout, email and address" }  - { from: storefront-api, to: db, label: read the cart and check the stock }  - { from: storefront-api, to: db, label: "one batch: insert the order, take the stock, close the cart" }  - { from: storefront-api, to: stripe, label: create a PaymentIntent for the order total }  - { from: storefront-api, to: db, label: save the PaymentIntent id on the order }  - { from: storefront-api, to: shopper, label: the order and the client secret }  - { from: shopper, to: stripe, label: confirm the payment with the Payment Element }  - { from: shopper, to: storefront-api, label: "GET /orders/:id until it is paid" }