createCurrencies - Pricing Module Reference
BetaThis documentation provides a reference to the createCurrencies
method. This belongs to the Pricing Module.
This method is used to create new currencies.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createCurrencies () {
const pricingService = await initializePricingModule()
const currencies = await pricingService.createCurrencies([
{
code: "USD",
symbol: "$",
symbol_native: "$",
name: "US Dollar",
}
])
// do something with the currencies or return them
}
Parameters
The currencies to create.
Returns
The list of created currencies.
Was this section helpful?