# External tax calculators

External tax calculators let you delegate tax calculation logic to an external service (either just different from the ones supported out-of-the-box by Commerce Layer or completely custom). This way, you can use the order payload to compute your own logic and return the tax rate to be applied to the order.

To create an external tax calculator choose a meaningful name that helps you identify it within your organization and specify the endpoint you have configured externally. Whenever the tax calculation is fired, Commerce Layer triggers a `POST` request to the tax calculator URL endpoint, sending the order payload (including its line items and their items) in the request body. The external service response (or error) must match the format described in [this example](/core/external-resources/external-tax-calculators.md#response).

External tax calculators are subject to a [circuit breaker](/core/external-resources.md#circuit-breaker) check: if the call to your external endpoint fails consecutively more than **30** times, the circuit breaker opens and any further request to the resource will be skipped. You can check the circuit breaker current status by fetching the `circuit_state` and `circuit_failure_count` attributes or manually reset it by passing the `_reset_circuit` trigger (the circuit is anyway automatically reset anytime a call to your external endpoint succeeds before reaching the counter's threshold).

<details>

<summary>How-to</summary>

Check the related [guide](/core/external-resources/external-tax-calculators.md) for any additional info on how to configure your external tax calculation engine and integrate it with Commerce Layer.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/core-api-reference/external_tax_calculators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
