Overview
Once a shopper has a cart, you can either redirect them to Henry’s hosted checkout or run the entire checkout flow server-side with our headless APIs. Both approaches reuse the cart you built with the Universal Cart guide and return an order ID you can track afterwards.Hosted checkout (fastest path)
Hosted checkout handles authentication, address capture, taxes, payments, and confirmation in a single responsive UI.1
Generate a checkout URL
Call The response returns a
POST /cart/checkout with the shopper’s x-user-id.checkout_url that you can embed in an iframe, open in a new tab, or load inside a native webview.2
Listen for postMessage events
When you embed the checkout page, subscribe to
window.postMessage to react to key lifecycle events such as orderCompleted or checkoutClosed. Refer to the hosted integration example in the E2E Hosted Checkout guide.Headless checkout API
Use the headless endpoints when you want full control over the checkout experience but still rely on Henry for payments, risk, and order orchestration.1
Create a quote session
Send
POST /checkout/session/quote with shipping details. The response returns a session_token and order_metadata containing taxes and totals.2
Review the session state
Use the session token to inspect the products and any shipping metadata Henry derived.The products payload mirrors your cart, while the shipping response indicates whether Henry already has shipping info (
hasShipping) and echoes the validated address.3
Collect a payment method
Launch Henry’s hosted card collection modal so the shopper can add a card before you place the order.
4
Confirm checkout
When the buyer approves the totals and payment method, call The confirmation response contains the newly created
POST /checkout/session/confirm to place the order. Provide the session token and include shipping details if you need to override the quote.orderId, monetary breakdown (subtotal, tax, shipping, grandTotal), and line-item snapshot so you can display a receipt instantly.Both hosted and headless flows return an order identifier you can monitor via
the Order Management guide.

