dist/cursor/medusa-commerce/skills/medusa-pricing/SKILL.md
Configure Medusa v2 pricing — pricing module, price lists with rules, currencies, tax calculation, regions, and promotion campaigns. Use when setting up pricing and discounts.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins medusa-pricingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
site:docs.medusajs.com pricing module for pricing data model and service methodssite:docs.medusajs.com price list rules for conditional pricing configurationsite:docs.medusajs.com promotion module for promotion types and ruleshttps://docs.medusajs.com/resources/references/pricing and review the IPricingModuleService interfacemedusajs v2 tax module region 2026 for latest tax calculation and region setupPriceSet
├── Prices[]
│ ├── amount (integer, minor units)
│ ├── currency_code
│ ├── min_quantity, max_quantity
│ └── Rules[] (region_id, customer_group_id)
└── MoneyAmounts[]
Product Module (variant) ──link──> Pricing Module (price set)
Region Module ──link──> Pricing Module (price context)
Customer Group ──link──> Pricing Module (group pricing)
Fetch live docs for exact link definitions and how price sets connect to product variants.
Customer Request
└─> Context: { region_id, currency_code, customer_group_id }
└─> Pricing Module: find best matching price
├── Check price lists (sale/override) with rules
├── Check variant prices with matching rules
└─> Return lowest applicable price
| Context Field | Source | Effect |
|---------------|--------|--------|
| region_id | Cart region | Filters by region-specific prices |
| currency_code | Region default | Determines currency |
| customer_group_id | Customer profile | Enables group-specific pricing |
| quantity | Line item qty | Enables quantity-based tiers |
| Type | Description | Use Case |
|------|-------------|----------|
| sale | Discounted price (lower than default) | Seasonal sales, flash deals |
| override | Replaces default price entirely | B2B/wholesale pricing |
| Field | Type | Description |
|-------|------|-------------|
| title | string | Display name |
| status | active/draft | Visibility |
| type | sale/override | Price list behavior |
| starts_at / ends_at | datetime | Scheduled activation window |
| rules | object | Customer group, region conditions |
| Operation | Method |
|-----------|--------|
| Create price set | pricingModuleService.createPriceSets() |
| Add prices | pricingModuleService.addPrices() |
| Create price list | pricingModuleService.createPriceLists() |
| Calculate price | pricingModuleService.calculatePrices() |
Fetch live docs for the full list of rule attributes and how to combine multiple rules.
| Field | Type | Description |
|-------|------|-------------|
| name | string | Display name (e.g., "North America") |
| currency_code | string | Default currency (e.g., "usd") |
| countries | relation | Countries in this region |
| automatic_taxes | boolean | Auto-calculate taxes |
| Region | Currency | Countries |
|--------|----------|-----------|
| North America | usd | US, CA |
| Europe | eur | DE, FR, IT, ES... |
| United Kingdom | gbp | GB |
1000| Concept | Description | |---------|-------------| | Tax Region | Geographic area with tax rules | | Tax Rate | Percentage rate for a tax region | | Tax Line | Calculated tax for a line item | | Tax Provider | External service (TaxJar, Avalara) or built-in |
| Setting | Options | Description |
|---------|---------|-------------|
| automatic_taxes | true/false | Auto-calculate vs manual |
| Tax-inclusive pricing | region setting | Prices include or exclude tax |
| Tax provider | built-in or custom | Calculation engine |
Fetch live docs for tax provider interface and tax-inclusive pricing configuration.
| Type | Description | Example |
|------|-------------|---------|
| standard | Rule-based discounts | 10% off orders over $100 |
| buyget | Buy-X-Get-Y promotions | Buy 2 get 1 free |
Promotion
├── code (optional coupon), type, is_automatic
├── ApplicationMethod
│ ├── type (percentage, fixed)
│ ├── allocation (each, across)
│ └── target_type (items, shipping, order)
└── Rules[] (attribute, operator, values)
| Type | Allocation | Description |
|------|------------|-------------|
| percentage | each | % off each qualifying item |
| percentage | across | % off total of qualifying items |
| fixed | each | Fixed amount off each item |
| fixed | across | Fixed amount off total |
| Rule Attribute | Operator | Description |
|----------------|----------|-------------|
| customer_group_id | in | Customer group membership |
| currency_code | eq | Specific currency |
| product_id | in | Specific products |
| product_collection_id | in | Specific collections |
Fetch live docs for the complete list of rule attributes and how promotions stack.
| Operation | Method |
|-----------|--------|
| Create promotion | promotionModuleService.createPromotions() |
| Compute actions | promotionModuleService.computeActions() |
| List promotions | promotionModuleService.listPromotions() |
sale price lists for temporary discounts and override for permanent B2B pricingis_automatic: true for site-wide promotions (no coupon code needed)automatic_taxes and configure tax regions for each countryFetch the Medusa v2 pricing, promotion, and tax module documentation for exact service method signatures, rule configuration, and price resolution logic before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.