Currency Module

The Currency Module provides currency-related features in your Medusa and Node.js applications.

How to Use Currency Module's Service#

You can use the Currency Module's main service by resolving from the Medusa container the resource Modules.CURRENCY imported from @medusajs/framework/utils.

For example:


Features#

Currency Retrieval#

List and retrieve currencies stored in your application.

Code
const currency = await currencyModuleService.retrieveCurrency("usd")

Support Currencies in Modules#

Other commerce modules use currency codes in their data models or operations. Use the Currency Module to retrieve a currency code and its details.

An example with the Region Module:

Code
1const region = await regionModuleService.retrieveRegion("reg_123")2const currency = await currencyModuleService.retrieveCurrency(3  region.currency_code4)
Was this page helpful?
Edit this page