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.
An item from a merchant that is
unsupported for checkout is rejected with a
403 naming the merchant, and no cart is created. If your app has
Experimental
merchants turned off,
testing merchants are rejected too.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. The same coverage check as cart creation applies: an item from a merchant your app may not check out from is rejected with a 403 and the cart is left unchanged.
Update an item quantity
To take an item out of the cart, use
cart.item.remove.link the cart does not already hold adds that item, so it is subject to the same coverage check as cart.item.add. The check runs once more when the order is placed, so a cart built before your app turned experimental merchants off, or before a merchant was marked unsupported, cannot be purchased either.
Remove an item
Fetch carts
Henry exposes two retrieval methods with different shapes:List carts
limit accepts 1-100 (default 20).
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
A purchase settles once, and fires exactly one of
order.purchase.complete,
order.purchase.partially_complete or order.purchase.failed. After an
item fails, the event can wait up to an hour before it fires, so it always
reports the final outcome. Until then the order and that item read
processing in every event payload, as they do when polled.
The full and partial events are kept for existing integrations. A
settled order fires them alongside the event above: complete also fires
order.purchase.full.complete, partially_complete also fires
order.purchase.partial.complete and order.purchase.partial.failed, and
failed also fires order.purchase.full.failed. Use the three settled
events for new integrations.
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