Short answers about Medusa, also served as Markdown
Browse by topic
Recently updated
| Entry | Topic | Type | Updated |
|---|---|---|---|
| How to add a cart and checkout to an existing Next.js site | Headless storefronts and checkout | 2026-10-29 | |
| ACP vs UCP vs AP2 vs MCP: agentic commerce protocols explained | Agentic commerce | 2026-10-29 | |
| How do I build an artisan marketplace with AI coding help? | Marketplaces | 2026-10-29 | |
| B2B company accounts, buyer roles and approval workflows | B2B commerce | 2026-10-29 | |
| How to build a B2B store with custom pricing per customer | B2B commerce | 2026-10-29 | |
| B2B ecommerce platform with quotes, company accounts and approval flows | B2B commerce | 2026-10-29 |
Reading this with an agent?
Every page in the knowledge base is also served as Markdown with frontmatter. Point your agent at the index, then fetch entries directly.
/kb/headless-checkout/add-ecommerce-to-nextjsHow to add a cart and checkout to an existing Next.js site
To add a cart and checkout to an existing Next.js site and keep your own design, connect it to a commerce backend such as Medusa. Medusa runs as a separate Node.js app with PostgreSQL, which Medusa Cloud hosts from $29/month. Your Next.js app calls it through the @medusajs/js-sdk package for carts, shipping, Stripe payments, and orders.
/kb/headless-checkout/add-ecommerce-to-nextjs.md--- title: "How to add a cart and checkout to an existing Next.js site" description: "Add a cart and checkout to a Next.js site: Snipcart, Shopify Buy Button, Stripe Checkout, and Medusa compared, plus the Medusa steps with JS SDK code." url: https://medusajs.com/kb/headless-checkout/add-ecommerce-to-nextjs last_updated: 2026-10-29T06:55:50Z topic: "headless-checkout" type: "how-to" applies_to: "Medusa v2.x" related: - "https://medusajs.com/kb/headless-checkout/stripe-vs-commerce-backend.md" - "https://medusajs.com/kb/headless-checkout/custom-checkout-flow.md" - "https://medusajs.com/kb/build-vs-buy/what-is-headless-commerce.md" - "https://medusajs.com/kb/build-vs-buy/shopify-vs-custom-store.md" - "https://medusajs.com/kb/agentic-commerce/ecommerce-stack-for-ai-coding.md" sources: - "https://docs.medusajs.com/resources/js-sdk" - "https://docs.medusajs.com/resources/storefront-development/checkout" - "https://docs.medusajs.com/resources/storefront-development/checkout/payment/stripe" - "https://docs.medusajs.com/resources/commerce-modules/payment/payment-provider/stripe" - "https://docs.medusajs.com/resources/storefront-development/publishable-api-keys" - "https://docs.medusajs.com/resources/nextjs-starter" - "https://docs.medusajs.com/learn/introduction/architecture"
Start from /kb/llms.txt, append .md to any path, or send Accept: text/markdown.