Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tax rules

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

Create a tax rule to be associated with a manual tax calculator. Use the available regular expressions to match the order's shipping address and apply the specified tax_rate (default is 0). You can optionally define the tax rule's taxable preferences by setting the freight_taxable, payment_method_taxable, gift_card_taxable, and adjustment_taxable attributes to true (all false by default).

Manual tax calculators support location-based tax rules only, matched against the shipping address's country, state, and zip codes:

  • country_code_regex / not_country_code_regex — positive and negative match patterns for the country code.

  • state_code_regex / not_state_code_regex — positive and negative match patterns for the state code.

  • zip_code_regex / not_zip_code_regex — positive and negative match patterns for the zip code.

Each regex can be up to 5000 characters long.

For any other use case, consider creating an external tax calculator that handles your custom tax calculation logic, or leveraging our out-of-the-box integrations with Avalara, Stripe Tax, TaxJar, and Vertex.

Last updated