/medusa-commerce:medusa-cart-checkoutfrom medusa-commerce
Implements Medusa v2 cart lifecycle and checkout flow: create cart, manage line items, set addresses, select shipping, and complete payment. Includes cart data model and workflow references.
Ships in medusa-commerce. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin medusa-commerce21 skills in this plugin
/medusa-adminExtend the Medusa v2 admin dashboard — widgets injected at zones, custom UI routes, Medusa UI components, and Admin API integration. Use when customizing the admin interface./medusa-api-routesCreate custom Medusa v2 API routes — file-based routing, HTTP method exports, middleware configuration, Zod validators, authentication middleware, and additional-data pattern. Use when adding REST endpoints./medusa-catalogManage the Medusa v2 catalog — products, variants, options, collections, categories, tags, and product metadata. Use when working with Medusa product data./medusa-customersManage Medusa v2 customers — customer profiles, email and social authentication, customer groups, addresses, and account management. Use when working with customer data and auth./medusa-deployDeploy Medusa v2 to production — build process, server vs worker mode, environment variables, hosting options, Redis caching, database configuration, and production checklist. Use when deploying Medusa applications./medusa-fulfillmentImplement Medusa v2 fulfillment — fulfillment module, provider interface, shipping options, fulfillment sets, shipping profiles, and multi-warehouse support. Use when adding fulfillment providers.Other plugins' skills for the same job