Skip to main content

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 from GetCart (or a previous cart mutation response).
  • sessionId – Session you used for AddToCart / 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:

  1. Use AddToCart or ReplaceCartItems with a sessionid header.
  2. Use GetCart to retrieve the cart and read cart.id.
  3. 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
  • storeHandle can 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 sessionid header across the entire customer journey so that all cart actions and the final checkout refer to the same cart.