Skip to main content

Anrok integration

Automatically calculate and apply the correct tax on every invoice by connecting Turnstile to Anrok

The Anrok integration automatically calculates sales tax, VAT (value-added tax), and GST (goods and services tax) on your invoices and displays the result to your customers. For each invoice issued with Anrok tax, Turnstile records the transaction in your Anrok account, so Anrok remains your system of record for tax liability, filing, and remittance.

Turnstile does not determine where you owe tax and does not remit taxes. Nexus decisions, tax registrations, exemption certificates, filing, and remittance are all managed in your Anrok account.

Note: The Anrok integration is not yet available to all accounts. If Anrok does not appear in Settings > Integrations in your Turnstile instance, get in touch with Turnstile Support.

Send your invoice history to Anrok

When you start using Anrok, Anrok asks for your past transactions so it can work out where you owe tax. This is called a historical backfill. If you invoiced customers through Turnstile before connecting Anrok, Turnstile has the data Anrok needs. Turnstile Support provides that data, and you complete the backfill in Anrok.

To complete a historical backfill in Anrok:

  1. Contact Turnstile Support at help@turnstile.ai and ask for your invoice history for an Anrok backfill. Include the date range you need.

  2. Turnstile Support sends you your issued and paid invoices.

  3. Enter the data into the Anrok backfill template.

  4. Review the completed template with your Anrok onboarding contact.

  5. Upload the file in your Anrok account.

Turnstile Support provides your invoice data but does not fill in or upload the Anrok backfill template. Anrok’s standard lookback for US jurisdictions is three years, and some jurisdictions go back as far as five years. Check the date range with your Anrok onboarding contact before you request data.

Connect the Anrok integration

Before you connect, you need:

  • An Anrok account.

  • An Anrok API key.

To connect Anrok to Turnstile:

  1. In Turnstile, go to Settings > Integrations.

  2. Select Configure next to Anrok.

  3. Select Grab your API Key to open Anrok, then create or copy your API key.

  4. In Turnstile, paste the key into the API key field.

  5. Select Connect your Anrok account.

Turnstile then verifies the key with Anrok, syncs your Anrok tax categories, and adds a link to your Anrok dashboard.

If the connection fails, check that you pasted the full key, or generate a new key in Anrok, then retry from the same page.

Choose which address Anrok uses to calculate tax

Anrok can calculate tax from each customer’s billing address (the default) or their shipping address.

To choose the address Anrok uses:

  1. Go to Settings > Integrations.

  2. Select Anrok.

  3. Under Address used for tax calculation, select Billing address or Shipping address. Your choice saves as soon as you select it.

The setting applies to quotes that are not paid yet and invoices that are not issued yet. Paid quotes and issued invoices keep their original tax.

When you select Shipping address:

  • Customers whose shipping address is set to Same as billing address are taxed on their billing address.

  • Customers with a separate shipping address are taxed on that address.

  • Turnstile re-checks the draft invoices of customers with a separate shipping address, so any address problems show before issuance.


Shipping addresses are used only for tax, including whether EU or UK reverse charge applies. Invoices still show the billing address in the Bill to section, and shipping addresses are not sent to Stripe or your CRM.

Add or update a customer’s shipping address

Every customer’s shipping address starts as Same as billing address, so existing customers need no changes unless they are taxed somewhere other than their billing address. You or your customer can add or update a shipping address:

  • On the customer page, in the Billing information section.

  • In the edit customer billing information dialog on a quote or invoice.

  • At checkout, if the quote is accepted through a checkout page.

  • Through the Turnstile API or MCP.

Choose what happens when Anrok is unavailable

If Anrok cannot be reached at the moment an invoice is issued, the If Anrok is unavailable setting on the Anrok integration page controls what happens. There are two options:

  • Block issuance (recommended): The invoice stays in draft so it can be issued later when Anrok is reachable. This option never under-collects tax.

  • Issue with no Anrok tax: The invoice is issued immediately with zero tax. The fallback is recorded on the invoice so the gap is auditable, and you absorb the tax liability for that invoice.

If an invoice is ever issued without Anrok tax, the Anrok integration page shows a banner reading An invoice was issued without Anrok tax with a link to the affected invoice.

Map Turnstile products to Anrok tax categories

Anrok determines how each product is taxed in each jurisdiction based on the product's tax category. Once Anrok is connected to Turnstile, you can assign a tax category when you create a product in Turnstile in either of these places:

  • Catalog > Products

  • Catalog > Plans, when adding a product to a plan

Each product can have one tax category. Products created in other workflows, such as directly on a quote, do not have a tax category yet. Turnstile checks for missing tax categories before an invoice is issued and shows you how to fix them. For details, see the Resolve tax alerts before issuing section of this article.

To assign an Anrok tax category to a Turnstile product:

  1. Go to Catalog > Products or Catalog > Plans.

  2. Create a new product, or open a product that does not have a tax category yet.

  3. In the Sales tax mapping section, select a category from the Tax category dropdown. The list of categories comes from your Anrok account.

  4. Confirm your selection in the Confirm tax category dialog.

  5. Save the product.

Change a tax category after saving a product

A product's tax category is registered with Anrok when the product is saved in Turnstile and cannot be changed afterward. To use a different tax category:

1. Create a new product with a different name and assign the correct tax category.

2. Update your plans and draft quotes/subscriptions to use the new product.

3. Archive the original product to remove it from your catalog.

Archiving a product does not affect plans, quotes, subscriptions, or invoices that already use it. Existing subscriptions and signed quotes continue to be taxed under the original tax category.

Reusing an archived product's name

If you enter a product name that matches an archived product, Turnstile restores that product instead of creating a new one. The Sales tax mapping section locks to the archived product's original tax category, and the save button changes to Unarchive.

To assign a different tax category, use a name that does not match any archived product.

How and when tax is calculated when using the Anrok integration

Turnstile calculates tax through Anrok once, at the moment an invoice is issued. The calculation is based on the customer’s billing or shipping address (depending on your Address used for tax calculation setting), each product’s tax category, and the invoice date.

Before issuance, the invoice's tax line shows Calculated at issuance, and the invoice total includes only pre-tax charges.

When the invoice is issued:

  • The tax line updates to a single combined rate, for example "Tax (8.25%)".

  • The invoice total updates to the subtotal plus the calculated tax.

  • The transaction is recorded in your Anrok account for filing and threshold monitoring.

The same tax line appears on the invoice page, the invoice PDF, and the invoice email. Per-jurisdiction detail is available in your Anrok account.

Tax on checkout pages

If your customer accepts a quote through a checkout page with payment, Turnstile shows an estimated tax based on the address your customer enters at checkout.

Checkout pages include a Shipping address section with Same as billing address selected by default. Your customer can clear the checkbox to enter a separate shipping address. If you tax on shipping address, the estimate updates after your customer confirms their address, and a note under the tax line shows which address was used, such as “Based on shipping address.

The amount your customer pays is the amount recorded in Anrok once payment completes. If Anrok cannot calculate tax while your customer is checking out, they cannot complete payment until the calculation succeeds.

The addresses your customer enters are saved to their customer record.

How discounts affect Anrok tax

Where you add a discount determines which products it applies to, and thus how much tax Anrok calculates on each product.

  • Discount on a product: The discount reduces that product only. Anrok calculates tax on the product’s discounted amount, under that product’s tax category. Other products are not affected.

  • Discount as its own line item: A discount on its own line is not a product and has no tax category. Before Turnstile sends the invoice to Anrok, it spreads the discount across the products on the invoice in proportion to each product’s amount.

For example, an invoice has a $1,000 USD platform fee, a $500 USD implementation fee, and a $150 USD discount line item. Anrok receives the platform fee as $900 USD and the implementation fee as $450 USD.

Your customer’s invoice still shows the discount as its own line. Only the amounts sent to Anrok change.

Tip: To discount one product only, such as a software subscription but not an implementation fee, apply the discount to that product instead of adding a discount line item.

Resolve tax alerts before issuing

While Anrok is connected, Turnstile validates every invoice before it is issued, whether you issue manually or use automatic issuance. Two problems block issuance:

  • Missing tax category: If one or more products on the invoice do not have a tax category, the invoice shows a banner naming the affected products.

  • Missing customer country: The address used for tax does not have a country, so Anrok cannot determine the tax jurisdiction. The alert says whether the billing address or shipping address needs a country. Add the country from the Billing information section on the customer page.

To fix a missing tax category:

  1. Open the invoice.

  2. Select Edit invoice on the alert banner.

  3. Open the affected line item.

  4. Select a category from the Tax category dropdown.

  5. Save the line item.

The tax category is saved on the product itself, so it applies to all uses of that product. Once every product on the invoice has a tax category, the invoice can be issued.

Note: A missing or incorrectly formatted Tax ID or an incomplete address shows a warning on the invoice but does not block issuance. Review these warnings before issuing.

If Anrok cannot use the address when the invoice is issued, the invoice stays in draft until the address is corrected.

Manage reverse charge for EU and UK customers

If the address Anrok uses for tax is in the European Union (EU) or the United Kingdom (UK) and Anrok determines that reverse charge applies, the customer is responsible for reporting VAT (value-added tax) to their tax authority, and you do not collect it. On these invoices:

  • The tax line shows a zero VAT amount for informational purposes. It is not added to the invoice total.

  • A reverse charge note appears on the invoice.

    • For customers in the United Kingdom, the note reads "Reverse charge: Customer to account for VAT to HMRC".

    • For customers in the European Union, the note reads "Reverse charge: VAT Act Article 196, Council Directive 2006/112/EC".

Add Tax IDs for reverse charge invoices

While tax IDs are optional fields and a missing tax ID does not block an invoice from issuing, a compliant reverse charge invoice includes both your VAT number and your customer's VAT number.

  • Add your customer's number in the Tax ID field when you create or edit a customer, or in the edit customer billing information dialog on a quote or invoice.

  • Add your own number in the Tax ID field on your billing entity in your quoter settings from Settings > Quoter settings in the Billing tab.

Correct an issued invoice that includes Anrok sales tax

Issued invoices cannot be edited. To correct one, void it and issue a replacement. For steps, see our void and reissue article.

When you void an invoice that has Anrok tax, the confirmation dialog shows a Sales tax update warning, and the tax transaction is also voided in your Anrok account. If the original transaction is already part of a filed return, Turnstile records an offsetting transaction in Anrok instead.

Before you issue the replacement invoice, you can correct the customer’s billing address, shipping address, and Tax IDs, and assign tax categories to any products that are missing one. The replacement invoice gets a fresh tax calculation, and a new transaction is recorded in Anrok when it is issued.

Note: Refunds recorded in Turnstile are not reported to Anrok. To correct the tax on an issued invoice, void and reissue it in Turnstile. For any other tax adjustment, update the transaction directly in your Anrok account.

Disconnect Anrok

After you disconnect, tax is no longer calculated or applied to your invoices automatically. Your Anrok settings are saved and restored if you reconnect later.

  1. In Turnstile, go to Settings > Integrations.

  2. Select Anrok.

  3. Select Disconnect.

  4. Select Disconnect in the confirmation dialog.

Anrok integration FAQs

Can I use Anrok and Stripe Tax together?

No. While you can continue to use Stripe for online payment collection, Anrok cannot be enabled while a connected Stripe account has Stripe tax calculation enabled. Using both would report tax twice. To switch to Anrok, first turn off Stripe tax calculation from Settings > Integrations > Stripe > Enable Stripe tax calculation.

When is tax calculated when using the Anrok integration?

Tax is calculated once, when the invoice is issued. Draft invoices show “Calculated at issuance” on the tax line, and quotes do not include calculated tax. The exception is a quote accepted through a checkout page with payment, where your customer sees an estimate based on the address they enter at checkout.

Does Turnstile notify Anrok when an invoice is paid?

No. The tax transaction is recorded in Anrok when the invoice is issued. Payment does not change the recorded tax, so no update is needed when your customer pays.

How do I handle tax-exempt customers when integrated with Anrok?

Manage exemption certificates in your Anrok account. When Anrok applies an exemption, the invoice issued in Turnstile reflects it automatically. There is no exemption setup in Turnstile.

Did this answer your question?