> 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](/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](/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](/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](/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](/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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
