---
displayed_sidebar: servicesSidebar
---

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

# ITaxService

Interface to be implemented by tax provider plugins. The interface defines a
single method `getTaxLines` that returns numerical rates to apply to line
items and shipping methods.

## Methods

#### getTaxLines

`**getTaxLines**(itemLines, shippingLines, context): Promise&#60;[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]&#62;`

Retrieves the numerical tax lines for a calculation context.

##### Parameters

<ParameterTypes parameters={[
  {
    "name": "itemLines",
    "type": "[ItemTaxCalculationLine](../types/ItemTaxCalculationLine.mdx)[]",
    "description": "the line item calculation lines",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "shippingLines",
    "type": "[ShippingTaxCalculationLine](../types/ShippingTaxCalculationLine.mdx)[]",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "context",
    "type": "[TaxCalculationContext](../types/TaxCalculationContext.mdx)",
    "description": "other details relevant to the tax determination",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />

##### Returns

Promise&#60;[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]&#62;

<ParameterTypes parameters={[
  {
    "name": "Promise",
    "type": "Promise&#60;[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "numerical tax rates that should apply to the provided calculation\n  lines",
    "expandable": false,
    "children": []
  }
]} />
