Search products, build a cart, launch checkout, and track an order.
Want to skip the reading and run it live? Check out our demo app or clone the quickstart repo.
This guide shows the full E2E flow - search → cart → checkout → order tracking. You don’t have to use all of it. Jump to whichever feature you need: you can call cart.checkout.purchase directly
with a product link, or use products.details standalone without ever touching the cart.
The checkoutUrl returned by cart.create points to Henry’s hosted checkout modal. Redirect your user, open it in an iframe, or pop it in a modal - Henry handles payment, address, and tax collection.
Copy
// Option A: Full page redirect (server-side)res.redirect(checkoutUrl);// Option B: Embed in an iframe (client-side)const iframe = document.createElement('iframe');iframe.src = checkoutUrl;iframe.style.cssText = 'width:100%;height:700px;border:none;border-radius:12px';document.getElementById('checkout-container')!.appendChild(iframe);// - [Optional]: Listen for completion eventswindow.addEventListener('message', (event) => { if (!event.origin.endsWith('.henrylabs.ai')) return; const { action, orderId } = event.data ?? {}; if (action === 'orderCompleted') { console.log('Order placed:', orderId); }});
The recommended approach is webhooks - Henry will POST to your endpoint when the order status changes, so you don’t have to poll.Register a webhook endpoint in the Henry Dashboard, then handle the events: