docs: clarify prices are stored in major units (#13897)

* update package

* docs: clarify prices are stored in major units

* revert change

* revert change

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
This commit is contained in:
Shahed Nasser
2025-10-31 13:29:37 +02:00
committed by GitHub
parent 38d486bec0
commit 3518ba1694
5 changed files with 8 additions and 8 deletions

View File

@@ -1876,11 +1876,11 @@ In Medusa v2, the price selection process is now implemented in the [Pricing Mod
If your use case is complex and these rules are not enough, you can create a new [module](../../fundamentals/modules/page.mdx) with the necessary logic, then use that module in your custom workflows.
## Prices are Stored in Base Units
## Prices are Stored in Major Units
In Medusa v1, prices were stored in the smallest currency unit. For example, a price of $10.00 was stored as `1000` (cents).
In Medusa v2, prices are stored in the base unit. For example, a price of $10.00 is stored as `10` (dollars).
In Medusa v2, prices are stored in the major unit. For example, a price of $10.00 is stored as `10` (dollars).
Learn more in the [Pricing Concepts](!resources!/commerce-modules/pricing/concepts) guide.

View File

@@ -125,7 +125,7 @@ export const generatedEditDates = {
"app/learn/introduction/build-with-llms-ai/page.mdx": "2025-10-02T15:10:49.394Z",
"app/learn/installation/docker/page.mdx": "2025-10-24T08:53:46.445Z",
"app/learn/fundamentals/generated-types/page.mdx": "2025-07-25T13:17:35.319Z",
"app/learn/introduction/from-v1-to-v2/page.mdx": "2025-09-29T15:33:38.811Z",
"app/learn/introduction/from-v1-to-v2/page.mdx": "2025-10-29T11:55:11.531Z",
"app/learn/debugging-and-testing/debug-workflows/page.mdx": "2025-07-30T13:45:14.117Z",
"app/learn/fundamentals/data-models/json-properties/page.mdx": "2025-07-31T14:25:01.268Z",
"app/learn/debugging-and-testing/logging/custom-logger/page.mdx": "2025-08-28T15:37:07.328Z",

View File

@@ -25935,11 +25935,11 @@ In Medusa v2, the price selection process is now implemented in the [Pricing Mod
If your use case is complex and these rules are not enough, you can create a new [module](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) with the necessary logic, then use that module in your custom workflows.
## Prices are Stored in Base Units
## Prices are Stored in Major Units
In Medusa v1, prices were stored in the smallest currency unit. For example, a price of $10.00 was stored as `1000` (cents).
In Medusa v2, prices are stored in the base unit. For example, a price of $10.00 is stored as `10` (dollars).
In Medusa v2, prices are stored in the major unit. For example, a price of $10.00 is stored as `10` (dollars).
Learn more in the [Pricing Concepts](https://docs.medusajs.com/resources/commerce-modules/pricing/concepts/index.html.md) guide.
@@ -35534,7 +35534,7 @@ In this guide, youll learn about the main concepts in the Pricing Module.
The [Price](https://docs.medusajs.com/references/pricing/models/Price/index.html.md) data model represents a specific price for a resource. For example, the price of a product variant in the USD currency.
The `Price` data model has an `amount` property that represents the monetary value of the price. It's stored as an integer in base or major units. For example, `$20.00` is stored as `20`, and `$20.5` is stored as `20.5`.
The `Price` data model has an `amount` property that represents the monetary value of the price. It's stored as an integer in major units. For example, `$20.00` is stored as `20`, and `$20.5` is stored as `20.5`.
The `Price` data model belongs to other data models like `PriceSet` and `PriceList` to provide a variety of pricing features, as explained below.

View File

@@ -10,7 +10,7 @@ In this guide, youll learn about the main concepts in the Pricing Module.
The [Price](/references/pricing/models/Price) data model represents a specific price for a resource. For example, the price of a product variant in the USD currency.
The `Price` data model has an `amount` property that represents the monetary value of the price. It's stored as an integer in base or major units. For example, `$20.00` is stored as `20`, and `$20.5` is stored as `20.5`.
The `Price` data model has an `amount` property that represents the monetary value of the price. It's stored as an integer in major units. For example, `$20.00` is stored as `20`, and `$20.5` is stored as `20.5`.
The `Price` data model belongs to other data models like `PriceSet` and `PriceList` to provide a variety of pricing features, as explained below.

View File

@@ -55,7 +55,7 @@ export const generatedEditDates = {
"app/commerce-modules/payment/page.mdx": "2025-04-17T08:48:11.702Z",
"app/commerce-modules/pricing/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/pricing/_events/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/pricing/concepts/page.mdx": "2025-09-11T11:39:20.879Z",
"app/commerce-modules/pricing/concepts/page.mdx": "2025-10-29T11:54:55.943Z",
"app/commerce-modules/pricing/price-calculation/page.mdx": "2025-09-05T07:54:21.322Z",
"app/commerce-modules/pricing/price-rules/page.mdx": "2025-06-10T15:56:43.648Z",
"app/commerce-modules/pricing/tax-inclusive-pricing/page.mdx": "2025-06-27T15:43:35.193Z",