Parameters
Returns
void
Examples
Checkout button
Checkout with validation
Checkout with custom return URL
Checkout with dynamic return URL
Checkout with confirmation
Disable button if cart empty
Behavior
- Gets the checkout URL from the current cart
- Redirects the browser using
window.location.href - User completes checkout on Shopify’s hosted page
After checkout completion, Shopify will redirect the user based on your
store’s settings (typically to an order confirmation page).