---
displayed_sidebar: pricingReference
badge:
  variant: orange
  text: Beta
slug: /references/pricing/createMoneyAmounts
sidebar_label: createMoneyAmounts
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# createMoneyAmounts - Pricing Module Reference

This documentation provides a reference to the `createMoneyAmounts` method. This belongs to the Pricing Module.

This method creates money amounts.

## Example

```ts
import {
  initialize as initializePricingModule,
} from "@medusajs/pricing"

async function retrieveMoneyAmounts () {
  const pricingService = await initializePricingModule()

  const moneyAmounts = await pricingService.createMoneyAmounts([
    {
      amount: 500,
      currency_code: "USD",
    },
    {
      amount: 400,
      currency_code: "USD",
      min_quantity: 0,
      max_quantity: 4
    }
  ])

  // do something with the money amounts or return them
}
```

## Parameters

<ParameterTypes parameters={[
  {
    "name": "data",
    "type": "[CreateMoneyAmountDTO](../../pricing/interfaces/pricing.CreateMoneyAmountDTO.mdx)[]",
    "description": "The money amounts to create.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "amount",
        "type": "`number`",
        "description": "The amount of this money amount.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "currency",
        "type": "[CreateCurrencyDTO](../../pricing/interfaces/pricing.CreateCurrencyDTO.mdx)",
        "description": "The currency of this money amount.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "code",
            "type": "`string`",
            "description": "The code of the currency.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "name",
            "type": "`string`",
            "description": "The name of the currency.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "symbol",
            "type": "`string`",
            "description": "The symbol of the currency.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "symbol_native",
            "type": "`string`",
            "description": "The symbol of the currecy in its native form. This is typically the symbol used when displaying a price.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "currency_code",
        "type": "`string`",
        "description": "The currency code of this money amount.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The ID of the money amount.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "max_quantity",
        "type": "`null` \\| `number`",
        "description": "The maximum quantity required to be purchased for this money amount to be applied.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "min_quantity",
        "type": "`null` \\| `number`",
        "description": "The minimum quantity required to be purchased for this money amount to be applied.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "sharedContext",
    "type": "[Context](../../pricing/interfaces/pricing.Context.mdx)",
    "description": "A context used to share resources, such as transaction manager, between the application and the module.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "enableNestedTransactions",
        "type": "`boolean`",
        "description": "A boolean value indicating whether nested transactions are enabled.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "isolationLevel",
        "type": "`string`",
        "description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "manager",
        "type": "`TManager`",
        "description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "transactionId",
        "type": "`string`",
        "description": "A string indicating the ID of the current transaction.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "transactionManager",
        "type": "`TManager`",
        "description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />

## Returns

<ParameterTypes parameters={[
  {
    "name": "Promise",
    "type": "Promise&#60;[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO.mdx)[]&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The list of created money amounts.",
    "expandable": false,
    "children": [
      {
        "name": "MoneyAmountDTO[]",
        "type": "[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO.mdx)[]",
        "optional": false,
        "defaultValue": "",
        "description": "",
        "expandable": false,
        "children": [
          {
            "name": "MoneyAmountDTO",
            "type": "`object`",
            "description": "A money amount's data. A money amount represents a price.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
