> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/core-api-reference/2026-05/external_tax_calculators.md).

# External tax calculators

The external tax calculator object and the allowed CRUD operations on the related resource endpoint

External tax calculators let you delegate tax calculation logic to an external service — whether a different provider from the ones supported out-of-the-box, or a completely custom solution. 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 set the `tax_calculator_url` attribute to the endpoint you have configured externally. Whenever the tax calculation is fired, Commerce Layer triggers a `POST` request to that endpoint, sending the order payload in the request body — by default, the payload includes the order's line items, though you can [customize](https://docs.commercelayer.io/core/external-resources.md#custom-include-list) which related resources are included via the `external_includes` attribute. The external service response (or error) must match the format described in [this example](https://docs.commercelayer.io/core/external-resources/external-tax-calculators.md#response).

{% hint style="info" %}
Commerce Layer signs outbound requests using the `shared_secret` attribute, so your external service can [verify their authenticity](https://docs.commercelayer.io/core/callbacks-security.md). You can regenerate the secret at any time by passing the `_regenerate_shared_secret` trigger attribute.
{% endhint %}

External tax calculators are subject to a [circuit breaker](https://docs.commercelayer.io/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's 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 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](https://docs.commercelayer.io/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
