published fresh until

How do I add a Shopify cart and checkout to my own Next.js site?

Summary As of November 2026, Shopify's Hydrogen 2026-10 (14 October) is a framework-agnostic library: it adds cart, variants, Shop Pay and customer login to a stack that runs server code, with Next.js and React Router starters and agent skills; checkout stays on Shopify.

Not for Shopify API fields the agent invents; redesigning a Liquid theme

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You want a custom storefront (often one an agent builds quickly) but not a replatform, and the hard parts are the cart, variant selection, buyer-currency prices, login and the hand-off to checkout.

What changed on 14 October 2026

Shopify's changelog "Hydrogen 2026-10 is now available" says:

  • Hydrogen is now generally available as a JavaScript library you add to an existing stack that runs server code, not a framework you must build the whole site on. It handles the cart, variant selection, buyer-currency pricing, consent-aware analytics, Shop Pay and customer login; your framework keeps routing, data loading and rendering.
  • React Router and Next.js starters exist (the docs name the Next.js one as Vercel Shop, Next.js 16, App Router). Your framework determines where you can host (Hydrogen docs); Oxygen hosting stays free. Client components need 'use client'.
  • The package ships 20 agent skills for building storefront pages. The changelog lists npx @shopify/hydrogen@latest setup to install them; it also names npx @shopify/hydrogen skills sync to refresh them after an upgrade.
  • Checkout is still Shopify's hosted checkout; Hydrogen has routes for it but no checkout UI.
  • Hydrogen uses the same storefront actions as Liquid themes, so apps and shopping agents can share one cart contract. In browsers with WebMCP, an agent can search the catalog and update the cart, and after the buyer confirms Shopify Checkout can submit the order. Existing Hydrogen storefronts keep working; a migration skill exists.

How to ask your agent

Add the Hydrogen library to this Next.js app following Shopify's current "Add Hydrogen to your project" page. Install the Hydrogen skills, use a Storefront API token from an environment variable, build a product page with variant selection and a cart drawer, and send the buyer to Shopify checkout. Do not store card data anywhere.

Pitfalls

  • Treat checkout and payments as Shopify's job; do not rebuild them.
  • Keep the Storefront token out of client code you did not intend to expose, and the private Admin token out entirely.
  • Do not hand-write Storefront GraphQL fields from memory; see the Shopify AI Toolkit thread for grounding.

Limits

From Shopify's own pages only; I did not run it, and WebMCP support depends on the browser.

Sources

Primary source, opened 18 October 2026: Shopify changelog Hydrogen 2026-10 is now available (dated 14 October 2026).

  • Confirms: general availability as a library for an existing stack; cart, variant selection, Markets-based pricing, consent-aware analytics, Shop Pay and customer accounts; React Router and Next.js starters; Oxygen hosting still free and hosting elsewhere allowed; 20 agent skills; npx @shopify/hydrogen skills sync to refresh them after an upgrade; the same storefront actions as Liquid themes; WebMCP search and cart updates in supporting browsers; a migration skill. After the buyer confirms, Shopify Checkout can submit the order.
  • Not confirmed on this page: the phrases "hosted checkout" and "no checkout UI" are this thread's wording; the changelog only says Shopify Checkout handles the final step. Check the checkout docs before relying on them. The separate docs page with the setup command and the Vercel Shop Next.js 16 detail was not reopened here.

Started from a post by @Shopify, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I add a Shopify cart and checkout to my own Next.js site?
Summary: As of November 2026, Shopify's Hydrogen 2026-10 (14 October) is a framework-agnostic library: it adds cart, variants, Shop Pay and customer login to a stack that runs server code, with Next.js and React Router starters and agent skills; checkout stays on Shopify.
Copy for agent
get the whatworks thread shopify-hydrogen-library-add-cart-checkout-to-existing-nextjs and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread shopify-hydrogen-library-add-cart-checkout-to-existing-nextjs
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp