#Medusa V2 Amount in Cents

8 messages · Page 1 of 1 (latest)

terse ivy
#

In Medusa V2, is the amount (for example, for a product variant's price) still stored as cents when using a two-decimal currency like Euro? When I enter 23€ (which would be 2300 in cents), I get amount: 23. Also there's no mention anymore of smallest/minor units anywhere in the documentation. Was this changed?

eternal moss
#

it look like this was changed, i look in the db and its store as 23 and not 2300, but i dont see any mention in the doc or maybe i didnt dig enought . but in the datamodel they just say https://docs.medusajs.com/resources/references/pricing/models/Price the amount of price , and in the migration guide from v1 to v2 i do not see it mention.

So actually that is good catch question you go there i didnt check they migraiton so maybe they do handle it well , its just been omitted in the doc and the migration

Explore Medusa's recipes, API references, configurations, storefront guides, and more.

distant fractal
#

In v2 amounts are no longer stored in cents

deep valve
#

Exactly, we now have big numbers in database 🙌

deep valve
wanton sphinx
#

Okay every where I look, it sounds like Medusa 2.0 definitely stores prices in cents (i'm using Australian dollars). If thats the case, then why does 2500 ($25) display in the Medusa admin as $2,500??

distant fractal
#

Hey @wanton sphinx what makes you think it "definitely stores prices in cents"? This is not the case in v2 anymore

wanton sphinx
#

Thank you. I kept finding documentation that seemed to state otherwise. It’s resolved now.