Calculate Tax
calculate_taxDetermine the applicable tax rate for a transaction using customer location, product type, and optional tax ID, returning tax rate, tax name, and reverse charge status.
Instructions
Calculate the applicable tax rate for a transaction based on customer location, product type, and optionally a tax ID. Returns the tax rate, tax name, and whether reverse charge applies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Transaction amount — used to calculate the tax amount | |
| tax_id | No | Customer tax ID (e.g. VAT number). If valid, reverse charge may apply | |
| to_city | No | Customer city | |
| tax_code | No | Tax code for the product/service (e.g. eservice, saas, ebook, standard) | |
| to_country | Yes | ISO 3166-1 alpha-2 country code of the customer (e.g. DE, US, GB) | |
| to_postal_code | No | Customer postal code — required for US tax calculations |