Back to Medusa

{metadata.title}

www/apps/resources/app/commerce-modules/tax/module-options/page.mdx

2.14.21.1 KB
Original Source

import { Table } from "docs-ui"

export const metadata = { title: Tax Module Options, }

{metadata.title}

In this guide, you'll learn about the options of the Tax Module.

providers

The providers option is an array of either tax module providers or path to a file that defines a tax provider.

When the Medusa application starts, these providers are registered and can be used to retrieve tax lines.

ts
import { Modules } from "@medusajs/framework/utils"

// ...

module.exports = defineConfig({
  // ...
  modules: [
    {
      resolve: "@medusajs/tax",
      options: {
        providers: [
          {
            resolve: "./path/to/my-provider",
            id: "my-provider",
            options: {
              // ...
            },
          },
        ],
      },
    },
  ],
})

The objects in the array accept the following properties:

  • resolve: A string indicating the package name of the module provider or the path to it.
  • id: A string indicating the provider's unique name or ID.
  • options: An optional object of the module provider's options.