medusa-pricing
Configure Medusa v2 pricing — pricing module, price lists with rules, currencies, tax calculation, regions, and promotion campaigns. Use when setting up pricing and discounts.
Best use case
medusa-pricing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Medusa v2 pricing — pricing module, price lists with rules, currencies, tax calculation, regions, and promotion campaigns. Use when setting up pricing and discounts.
Teams using medusa-pricing should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/medusa-pricing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How medusa-pricing Compares
| Feature / Agent | medusa-pricing | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Medusa v2 pricing — pricing module, price lists with rules, currencies, tax calculation, regions, and promotion campaigns. Use when setting up pricing and discounts.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Medusa v2 Pricing and Promotions
## Before writing code
**Fetch live docs**:
1. Web-search `site:docs.medusajs.com pricing module` for pricing data model and service methods
2. Web-search `site:docs.medusajs.com price list rules` for conditional pricing configuration
3. Web-search `site:docs.medusajs.com promotion module` for promotion types and rules
4. Fetch `https://docs.medusajs.com/resources/references/pricing` and review the `IPricingModuleService` interface
5. Web-search `medusajs v2 tax module region 2026` for latest tax calculation and region setup
## Pricing Module Architecture
### Entity Relationships
```
PriceSet
├── Prices[]
│ ├── amount (integer, minor units)
│ ├── currency_code
│ ├── min_quantity, max_quantity
│ └── Rules[] (region_id, customer_group_id)
└── MoneyAmounts[]
```
### Module Links
```
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.
## Price Calculation
### Resolution Flow
```
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
```
### Pricing Context
| 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 |
## Price Lists
### Types
| Type | Description | Use Case |
|------|-------------|----------|
| `sale` | Discounted price (lower than default) | Seasonal sales, flash deals |
| `override` | Replaces default price entirely | B2B/wholesale pricing |
### Configuration
| 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 |
### Key Service Methods
| 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.
## Regions and Currencies
### Region Model
| 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 Mapping
| Region | Currency | Countries |
|--------|----------|-----------|
| North America | `usd` | US, CA |
| Europe | `eur` | DE, FR, IT, ES... |
| United Kingdom | `gbp` | GB |
- Each region has exactly **one** default currency
- Prices stored in **minor units** (cents): $10.00 = `1000`
## Tax Calculation
| 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 |
### Tax Configuration
| 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.
## Promotion Module
### Promotion Types
| Type | Description | Example |
|------|-------------|---------|
| `standard` | Rule-based discounts | 10% off orders over $100 |
| `buyget` | Buy-X-Get-Y promotions | Buy 2 get 1 free |
### Promotion Structure
```
Promotion
├── code (optional coupon), type, is_automatic
├── ApplicationMethod
│ ├── type (percentage, fixed)
│ ├── allocation (each, across)
│ └── target_type (items, shipping, order)
└── Rules[] (attribute, operator, values)
```
### Application Method Types
| 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 |
### Promotion Rules
| 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.
### Key Service Methods
| Operation | Method |
|-----------|--------|
| Create promotion | `promotionModuleService.createPromotions()` |
| Compute actions | `promotionModuleService.computeActions()` |
| List promotions | `promotionModuleService.listPromotions()` |
## Best Practices
### Pricing Strategy
- Store all prices in **minor units** (cents/pence) — never use decimals
- Create region-specific prices for multi-currency stores
- Use `sale` price lists for temporary discounts and `override` for permanent B2B pricing
### Promotions
- Use `is_automatic: true` for site-wide promotions (no coupon code needed)
- Combine rules for targeted promotions (e.g., VIP customers + specific collections)
- Test promotion stacking behavior — multiple promotions may apply to the same cart
### Tax and Performance
- Enable `automatic_taxes` and configure tax regions for each country
- Decide on tax-inclusive vs tax-exclusive pricing per region at setup time
Fetch the Medusa v2 pricing, promotion, and tax module documentation for exact service method signatures, rule configuration, and price resolution logic before implementing.Related Skills
medusa-workflows
Build Medusa v2 workflows — steps with createStep, compensation/rollback, parallel execution, hooks for extending built-in workflows, and when conditions. Use when orchestrating multi-step operations.
medusa-testing
Test Medusa v2 applications — Jest setup, module unit tests, workflow integration tests, API route tests, medusaIntegrationTestRunner, and mock patterns. Use when writing tests for Medusa projects.
medusa-subscribers
Implement Medusa v2 event subscribers — pub/sub event handling, subscriber handler functions, scheduled jobs with cron, and the event module (Redis or in-memory). Use when reacting to commerce events.
medusa-storefront
Build Medusa v2 storefronts with Next.js 15 — App Router, JS SDK client setup, Tanstack Query, server components, product pages, cart, and checkout flow. Use when developing headless storefronts.
medusa-setup
Set up a Medusa v2 development environment — CLI, PostgreSQL/Redis prerequisites, project creation, medusa-config.ts, directory structure, environment variables. Use when starting a new Medusa project.
medusa-security
Secure Medusa v2 applications — authentication strategies, API key types (publishable vs secret), CORS configuration, JWT and cookie secrets, admin vs store auth, and session management. Use when configuring security.
medusa-plugins
Develop and publish Medusa v2 plugins — plugin structure, plugin vs module comparison, npm packaging, and reusable plugin template. Use when building distributable Medusa extensions.
medusa-payments
Implement Medusa v2 payment processing — payment module, provider abstraction, payment sessions, authorization/capture/refund lifecycle, and Stripe/PayPal integration. Use when adding payment providers.
medusa-orders
Manage Medusa v2 orders — order lifecycle and state machine, fulfillment workflows, returns, exchanges, claims, draft orders, and order editing. Use when working with order processing.
medusa-modules
Build custom Medusa v2 modules — DML data models, services extending MedusaService, loaders, module links, and container registration. Use when creating custom modules.
medusa-fulfillment
Implement Medusa v2 fulfillment — fulfillment module, provider interface, shipping options, fulfillment sets, shipping profiles, and multi-warehouse support. Use when adding fulfillment providers.
medusa-deploy
Deploy 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.