Playbook · Hydrogen / Storefront API cart broken or empty after add

Shopify Hydrogen / headless Storefront API cart broken or empty after add — cart mutations, buyer identity, cookies, Oxygen.

Written for a Shopify DTC owner or headless lead whose Hydrogen / headless cart stays empty, drops lines, or fails after Add to cart — usually a failed cartCreate / cartLinesAdd mutation, a lost cart id cookie / session on Oxygen, buyer identity mismatch, or a Storefront API token without cart scopes. DIY-first: prove the GraphQL cart path on the live hostname, fix mutations and cookies, confirm token + Oxygen env, redeploy if needed, retest. Distinct from Online Store cart drawer / mini-cart not opening, Add to cart / Buy it now greyed out on Liquid PDP, and checkout UI extension not loading. Also distinct from Hydrogen / Oxygen blank page or deploy error when the whole storefront white-screens. No earnings claims, no invented case studies.

Nico at Latch AI Ops · Sep 9, 2026 · ~12 minute read

Buy the 72-hour install — $997Cart drawerATC buttonMerchant FAQ

01

Hydrogen / Storefront API cart broken or empty after add — not Online Store cart drawer, ATC button, checkout UI extension.

Several products can look like “Add to cart did nothing.” They do not share a settings panel. This page is only when a Hydrogen / headless Storefront API cart stays empty, drops lines, or cartCreate / cartLinesAdd fails after add. An Online Store Liquid theme cart drawer / mini-cart that never opens is shopify-cart-drawer-not-opening. A Liquid PDP Add to cart / Buy it now greyed out is shopify-add-to-cart-button-not-working. Checkout UI extensions / app blocks missing on checkout are shopify-checkout-ui-extension-not-loading. A whole Hydrogen URL that white-screens or fails Oxygen deploy is hydrogen-storefront-blank-or-error. This page is only: Shopify Hydrogen / headless Storefront API cart broken or empty after add (cart mutations, buyer identity, cookies, Oxygen).

Six ordinary reasons the Hydrogen cart stays empty: cartCreate / cartLinesAdd GraphQL errors (merchandise id, quantity, selling plan), cart id never written to cookie / session so the next request creates a new empty cart, buyer identity / customerAccessToken mismatch wiping lines, Storefront API token missing unauthenticated cart / checkout scopes, Oxygen env pointing at the wrong shop / token, or you are debugging Online Store cart drawer / Liquid ATC / checkout UI extensions instead. Walk them in that order. You already pay for Shopify, Hydrogen, and Oxygen. You do not need another headless cart SaaS to read Network and fix mutations.

02

Prove cartCreate / cartLinesAdd vs buyer identity vs cart cookie on live Oxygen.

Open the live Hydrogen hostname (incognito). Add a known in-stock variant. In Network, find the Storefront API GraphQL calls for cartCreate, cartLinesAdd, and follow-up cart queries. Note HTTP status, GraphQL userErrors, the cart id returned, and whether Application → Cookies shows a stable cart / session cookie after the mutation.

Honest proof: screenshot the mutation request + response (cart id and lines), the cookie / session that stores that cart id, and any buyerIdentity / customerAccessToken headers. If the click never fires a Storefront API mutation and you are on a Liquid Online Store theme, switch to cart drawer not opening or ATC button not working instead of rewriting Hydrogen cart loaders.

03

Repair failed cart mutations, lost cart cookie / session, and buyer identity.

Fix userErrors on merchandise (variant gid), quantity, and selling plan first. Then ensure the cart id from a successful create/add is persisted (Hydrogen cart cookie / session helpers) and reused on the next navigation — creating a new cart on every click is the classic “empty after add” path. If the shopper is logged in, align buyerIdentity / customer access token with the same cart; a mismatched identity often returns an empty cart query.

Honest proof: after the fix, one cart id survives PDP → cart → checkout handoff, lines remain on reload, and Network shows cartLinesAdd 200 without userErrors. Checkout UI extension blocks on checkout.shopify.com stay on shopify-checkout-ui-extension-not-loading. Keep those panels off this Hydrogen cart path.

04

Confirm Storefront API token scopes + Oxygen env, redeploy, retest live Add to cart.

On the Oxygen environment that serves the live Hydrogen URL, confirm the Storefront API token matches the shop you are testing and includes the unauthenticated cart / checkout scopes your template expects. Wrong shop domain, rotated token, or missing write scopes produce empty carts or 401/403 on mutations even when the UI looks fine. Local .env does not ship with the deploy.

Honest proof: regenerate or re-scope the token if needed, paste it into the production Oxygen environment, redeploy, hard-refresh the live hostname, and capture a successful cartLinesAdd plus a cart query that returns the same lines. If the entire storefront is blank or Oxygen deploy fails before any cart click, use hydrogen-storefront-blank-or-error first.

05

You tested Online Store cart drawer, ATC button, or checkout UI extension instead.

Online Store cart drawer / mini-cart not opening is shopify-cart-drawer-not-opening. Liquid PDP Add to cart / Buy it now greyed out is shopify-add-to-cart-button-not-working. Checkout UI extension / app block not loading is shopify-checkout-ui-extension-not-loading. Hydrogen / Oxygen blank or deploy error is hydrogen-storefront-blank-or-error. None of those replace proving Storefront API cart mutations and cart cookies on Oxygen.

Finish the Hydrogen cart mutation + cookie + token proofs first. Only then open the related playbook that matches the remaining symptom.

06

When to stay DIY vs pay $997.

Stay DIY if you can spend one afternoon on the list above: prove cartCreate / cartLinesAdd on the live Oxygen hostname, persist the cart id cookie / session, align buyer identity, confirm Storefront API token scopes on the Oxygen environment, redeploy if needed, and stop confusing Online Store cart drawer / Liquid ATC / checkout UI extensions with this headless cart path. That is the whole playbook. No agency required. Short answers also live on the merchant FAQ. Related pages: cart drawer not opening, ATC button not working, checkout UI extension not loading, Hydrogen blank / deploy error.

Pay for help when the work is not Hydrogen cart mutations — it is connecting the stack you already have so lead capture is not dying in DMs, checkout and ops exceptions land in a channel you already check, and the live store is one workflow instead of a spreadsheet plus a Slack bot you forgot. That is the Latch AI Ops install.

What $997 USD one-time buys: lead capture on the live store, ops alerts in a channel you already check, and a checkout-ready workflow. 72 hours after collaborator access, not after payment. One live Shopify store. Access plus a delivery thread. Store URL collected at checkout. Not a SaaS seat, not a Hydrogen agency retainer, not a conversion guarantee, not a brand or theme job.

Other shops’ public ranges, not testimonials: a checkout / ops install typically runs $500–$2,500. A full ops consulting block typically runs $2,000–$5,000. $997 is the cheap end of that work, sold as a 72-hour install of three systems — not as an earnings number or conversion-lift claim.

What it does not buy: more orders, recovered revenue, a forever Hydrogen cart uptime guarantee, a custom headless rebuild retainer, or a case study. Latch AI Ops has not published customer proof because there are no customers yet. You are buying the install.

Checkout is on Whop. Operator is Nico. United States offer. You can revoke collaborator access after handoff. We do not take owner passwords.