Help us improve
Share bugs, ideas, or general feedback.
From medusa-commerce
Implements Medusa v2 cart and checkout flows: lifecycle, line items, addresses, shipping/payment selection, sales channels, completion. Use for e-commerce cart building.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin medusa-commerceHow this skill is triggered — by the user, by Claude, or both
Slash command
/medusa-commerce:medusa-cart-checkoutThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Fetch live docs**:
Builds Medusa v2 headless storefronts with Next.js 15 App Router, JS SDK, TanStack Query, server components, product pages, cart, and checkout flows.
Implement Saleor checkout flow via GraphQL: create checkout, manage lines, set shipping/billing addresses, select delivery, initialize/process payments, complete order. For e-commerce apps.
Designs e-commerce shopping carts and checkout flows: architectures (session/DB/Redis/headless APIs), express checkout (Apple Pay/Google Pay/Shop Pay), shipping/tax integrations (Shippo/Avalara), promotions, cart recovery (Klaviyo), BOPIS.
Share bugs, ideas, or general feedback.
Fetch live docs:
site:docs.medusajs.com cart module for cart data model and service methodssite:docs.medusajs.com checkout flow for the end-to-end checkout processsite:docs.medusajs.com sales channel for sales channel scopinghttps://docs.medusajs.com/resources/references/cart and review the ICartModuleService interfacemedusajs v2 cart workflow 2026 for latest cart-related workflow stepsCreate Cart ──> Add Line Items ──> Set Address
──> Select Shipping ──> Init Payment ──> Complete
| State | Description |
|---|---|
| Active | Cart is open, items can be added/removed |
| Completing | Checkout in progress, payment being processed |
| Completed | Cart converted to order, no further modifications |
| Entity | Key Fields |
|---|---|
| Cart | region_id, customer_id, sales_channel_id, email |
| LineItems[] | variant_id, quantity, unit_price, Adjustments[] |
| ShippingMethods[] | shipping_option_id, amount, data |
| Addresses | shipping_address, billing_address |
| PaymentCollection | PaymentSessions[] |
| Link Target | Purpose |
|---|---|
| Product Module | Variant resolution |
| Region Module | Currency, tax rules |
| Sales Channel Module | Storefront scoping |
| Promotion Module | Discount application |
| Payment Module | Payment sessions |
| Fulfillment Module | Shipping methods |
Fetch live docs for cross-module link definitions and
remoteQueryusage for cart enrichment.
// Skeleton: create cart in storefront
// Fetch live docs for createCartWorkflow input
const cart = await createCartWorkflow(container)
.run({ input: { region_id, sales_channel_id } })
// Fetch live docs for required vs optional fields
| Workflow | Purpose |
|---|---|
addToCartWorkflow | Add variant + quantity to cart |
updateLineItemInCartWorkflow | Update quantity of existing item |
deleteLineItemsWorkflow | Remove items from cart |
| Field | Required | Notes |
|---|---|---|
first_name / last_name | Yes | |
address_1 | Yes | Street address |
city | Yes | |
country_code | Yes | ISO 2-letter code |
postal_code | Conditional | Required by region |
province | Conditional | State/province |
Available options determined by cart region, shipping address, and shipping profiles.
| Workflow | Purpose |
|---|---|
listShippingOptionsForCartWorkflow | Fetch available options |
addShippingMethodToCartWorkflow | Apply selected shipping option |
| Workflow | Purpose |
|---|---|
createPaymentCollectionForCartWorkflow | Create payment collection |
initializePaymentSessionWorkflow | Start provider-specific session |
| Workflow | Purpose |
|---|---|
completeCartWorkflow | Convert cart to order |
Completion validates: all items in stock, shipping selected, payment authorized, email set.
Fetch live docs for the exact validation checks performed during cart completion.
| Concept | Description |
|---|---|
| Sales Channel | Named storefront scope (e.g., "Web", "Mobile App", "B2B") |
| Publishable API Key | Associates Store API requests with a sales channel |
| Product-Channel Link | Products published to specific channels |
x-publishable-api-key headerFetch live docs for publishable API key configuration and sales channel management.
| Route Pattern | Method | Purpose |
|---|---|---|
/store/carts | POST | Create cart |
/store/carts/:id | GET | Retrieve cart |
/store/carts/:id | POST | Update cart (email, address) |
/store/carts/:id/line-items | POST | Add line item |
/store/carts/:id/line-items/:item_id | POST/DELETE | Update/remove line item |
/store/carts/:id/shipping-methods | POST | Add shipping method |
/store/carts/:id/payment-collections | POST | Create payment collection |
/store/carts/:id/complete | POST | Complete checkout |
Fetch live docs for request body shapes and response formats on each route.
region_id -- it determines currency, tax rules, and shippingsales_channel_id to scope product availability per storefrontmetadata (e.g., gift messages, notes)remoteQuery to enrich cart data (product details, images) in a single queryFetch the Medusa v2 cart module documentation and checkout workflow references for exact service method signatures, workflow inputs, and validation rules before implementing.