Store Module

The Store Module provides store-related features in your Medusa and Node.js applications.

How to Use Store Module's Service#

You can use the Store Module's main service by resolving from the Medusa container the resource Modules.STORE.

For example:


Features#

Store Management#

A store holds the main configurations of your commerce store, such as supported currencies, default region and sales channel, and more.

Code
1const store = await storeModuleService.createStores({2  name: "My Store",3  supported_currency_codes: ["usd"],4})

Multi-Tenancy Support#

You can create multiple stores, each having its own configurations.

Code
1const stores = await storeModuleService.createStores([2  {3    name: "USA Store",4    supported_currency_codes: ["usd"],5  },6  {7    name: "Europe Store",8    supported_currency_codes: ["eur"],9  },10])
Was this page helpful?
Edit this page