This guide walks you through building a complete purchase flow with the Henry Shopping SDK. You’ll search the catalog, show product details, add items to a cart, launch hosted checkout, and monitor the resulting order.
Want to see it in action? Check out our Live
Demo — a fully functional Next.js app that you
can clone and run
locally.
const checkout = await client.cart.createCheckout({ "x-user-id": userId });const checkoutUrl = checkout.data.checkout_url;// Redirect the shopper, open an iframe, or launch a modal with this URL// Capture the emitted orderId once the hosted flow reports order completion
Hosted checkout collects shipping details, payments, taxes, and confirmation in one responsive flow. Prefer a custom experience? Jump to Headless Checkout after you finish this quickstart.
const orderId = "order_123"; // returned from the hosted checkout completion eventconst order = await client.orders.retrieveStatus(orderId);console.log(order.data.status, order.data.statusMessage);
Use polling or background jobs to keep your application in sync until the order reaches a terminal state such as delivered, cancelled, or failed.