spz-checkout
When to use
spz-checkout handles the cart-to-checkout transition. When the user clicks the checkout button, it fetches cart data and calls the buy-now API, then redirects to the checkout page.
Supported layout
container
Example
With order note
Attributes
DOM role convention
Behavior
- On click of the
[role="checkout"]button, the component fetches cart data from the element specified bycart. - A loading state is shown on the button.
- The buy-now API is called with the cart token and optional order note.
- On success, the browser redirects to the checkout URL.
- On failure, a toast message is displayed and the page reloads.
Notes
- This component does not expose custom actions.
- This component does not emit custom events.
- The
[role="checkout"]child element is required for the component to function.