Checkout Cart
CheckoutCart Redirect
This SampleAPI explains how to redirect a customer from a custom landing page or funnel to the unified checkout page, after you have already prepared the cart using the other cart SampleAPIs.
There is no GraphQL operation on this page – it only documents the redirect URLs and required preconditions.
Prerequisites​
Before redirecting to checkout you should already have:
cartId– Obtained fromGetCart(or a previous cart mutation response).sessionId– Session you used forAddToCart/ReplaceCartItems.store_domain– Your store's domain (e.g.pharmacy.wuiltstore.com).locale– Current language/locale (e.g.en).storeHandle– Only needed when Wuilt Pay is enabled (visible in your existing checkout URL after/store/).
Typical flow:
- Use
AddToCartorReplaceCartItemswith asessionidheader. - Use
GetCartto retrieve the cart and readcart.id. - Build the redirect URL below and send the customer to checkout.
Checkout Redirect URLs​
After you have the cartId, you can redirect the customer to the store checkout page.
When Wuilt Pay is not enabled​
Format:
https://{store_domain}/{locale}/checkout/{cartId}
Example:
https://pharmacy.wuiltstore.com/en/checkout/Cart_d8f8ce2f-681e-4554-93b7-230e0b34a151
When Wuilt Pay is enabled​
Format:
https://pay.wuiltstore.com/{locale}/store/{storeHandle}/cart/{cartId}
Example:
https://pay.wuiltstore.com/en/store/groceries-test-store/cart/Cart_b9a8ee66-5bf0-4cc0-9f78-7e8ac2403b87
storeHandlecan be taken from your store's existing checkout URL (segment after/store/).
Implementation Notes​
- This page is redirect-only: use the cart SampleAPIs (
AddToCart,ReplaceCartItems,GetCart,ApplyPromoCode) to build the cart, then apply the URLs above. - Always reuse the same
sessionidheader across the entire customer journey so that all cart actions and the final checkout refer to the same cart.