- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Tax Module
The Tax Module provides tax-related features in your Medusa and Node.js applications.
How to Use Tax Module's Service#
You can use the Tax Module's main service by resolving from the Medusa container the resource Modules.TAX
imported from @medusajs/framework/utils
.
For example:
Features#
Tax Settings Per Region#
Set different tax settings for each tax region.
Tax Rates and Rules#
Manage each region's default tax rates and override them with conditioned tax rates.
1const taxRates = await taxModuleService.createTaxRates([2 {3 tax_region_id: "txreg_123",4 name: "Default tax rate",5 is_default: true,6 rate: 10,7 },8 {9 tax_region_id: "txreg_123",10 name: "Shirt product type",11 is_default: false,12 rate: 15,13 rules: [14 {15 reference: "product_type",16 reference_id: "ptyp_1",17 },18 ],19 },20])
Retrieve Cart's Tax Lines#
Calculate and retrieve the tax lines of a cart's line items and shipping methods with tax providers.
You can use different tax providers for each region to handle tax-line retrieval differently.
Configure Tax Module#
Refer to this documentation for details on the module's options.
Was this page helpful?