Overview
The Henry cart is a persistent server-side object that holds items from any merchant in a single checkout experience. Creating a cart immediately returns both acartId and a checkoutUrl - there’s no separate step to generate a checkout link.
Prerequisites
Create a cart
cart.create is the starting point. Pass an array of items using product link URLs (from search results or any product page), and optionally configure cart settings and tags. Each item can also include an affiliateProductLink, selected options, shipping, coupons, and metadata.
The
checkoutUrl is your hosted checkout link - share it with your user directly. See Checkout for how to embed it.Cart creation response
Manage cart items
Add an item
Add a product to an existing cart. Use the productlink URL as the identifier.
Update an item quantity
Setting
quantity to 0 via cart.item.update also removes the item from the cart.Remove an item
Fetch carts
Henry exposes two retrieval methods with different shapes:List carts
Fetch a single cart (with optional buyer prefill)
cart.fetch returns one cart by id. Pass an optional buyer to prefill the hosted checkout - the returned checkoutUrl will embed the buyer details as query params so fields render pre-filled when the user opens it.
buyer is purely a UX convenience for hosted checkout - it does not persist on the cart. To actually commit buyer info, use Headless Checkout via cart.checkout.purchase.Delete a cart
Remove a cart entirely when it’s no longer needed (e.g. on session logout).Cart item fields reference
Cart tags
Attach key-valuetags when creating a cart to associate it with your own identifiers (e.g. user IDs, regions, campaigns). You can then filter carts by tags with cart.list.
Cart settings reference
Cart events
settings.events lets you attach triggers to cart lifecycle events. Each entry declares an event type to listen for, an optional conditional, and a list of actions (data) to fire when it occurs.
Supported event types
Order events
Points & tier events
Supported action types
Example - webhook on successful purchase
Example - award points on purchase
Conditionals
Add aconditional to a trigger to gate it on the buyer’s current tier or points balance:
Register and manage webhooks in the Henry Dashboard. The
webhookUUID is the identifier assigned when you create a webhook endpoint. See
Webhooks for payload shape, verification, and the full event reference.Error handling
Next steps
Once your cart is ready, proceed to checkout:Checkout
Embed the hosted checkout or call the headless purchase API
Order Management
Track and list orders after checkout completes