www/apps/resources/references/tax/ITaxModuleService/methods/tax.ITaxModuleService.getProvider/page.mdx
import { TypeList } from "docs-ui"
This documentation provides a reference to the getProvider method. This belongs to the Tax Module.
You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
</Note>This method returns the service of a Tax Module Provider by its ID. A Tax Module Provider's ID is of the format
tp_{identifier}_{id}, where identifier is the static identifier property defined in the provider's service,
and id is the ID set in medusa-config.ts when registering the provider.
const avalaraProvider = taxModuleService.getProvider("tp_avalara_avalara")
// TODO: perform custom actions with the provider
<TypeList types={[{"name":"providerId","type":"string","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getProvider"/>
<TypeList types={[{"name":"getIdentifier","type":"() => string","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getTaxLines","type":"(itemLines: ItemTaxCalculationLine[], shippingLines: ShippingTaxCalculationLine[], context: TaxCalculationContext) => Promise<(ItemTaxLineDTO \| ShippingTaxLineDTO)[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getProvider"/>