> ## Documentation Index
> Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Anrok

> Learn how to connect Anrok with Alguna

Anrok is one of the external tax providers Alguna can use to calculate sales tax, VAT and GST: with it connected, Alguna asks Anrok to determine tax for every invoice line, checkout, and `POST /tax/calculations` request from the customer's address and the line's tax code, and records finalized invoices and credit notes in Anrok so they flow into your filings. Use it when Anrok is your system of record for registrations and returns. The alternatives are rules you maintain yourself ([Alguna Tax](/docs/tax/alguna-tax)) or [Stripe Tax](/docs/integrations/sales-tax/stripe-tax); how tax fits into invoicing is in [Tax overview](/docs/tax/overview). This integration requires an Anrok seller account.

### Set up Anrok

<Note>
  **Production:** [https://app.alguna.io/settings/connections/integrations](https://app.alguna.io/settings/connections/integrations)<br />**Sandbox:** [https://app.sandbox.alguna.io/settings/connections/integrations](https://app.sandbox.alguna.io/settings/connections/integrations)
</Note>

<Steps>
  <Step title="Create an API key in Anrok">
    In Anrok, create an API key for the seller account you want Alguna to use. The key needs access to products and transactions: Alguna creates products in your account and records transactions against them. Use a sandbox seller account for the Alguna sandbox and your production seller account for production, since products and transactions live per seller account.
  </Step>

  <Step title="Connect Anrok">
    Log into the correct environment and go to **Settings → Connections → Integrations**. Click **Connect** on Anrok and paste the API key. Alguna stores the key encrypted and validates it against Anrok before saving. If you run more than one Anrok seller account, give each connection a seller name so you can tell them apart.
  </Step>

  <Step title="Enable Anrok as your tax provider">
    In **Settings → Workflows → Billing → Tax**, choose the legal entity and set its tax provider to your Anrok connection. The engine is chosen per legal entity, so other entities can keep using Alguna Tax or Stripe Tax.
  </Step>

  <Step title="Choose calculation only, or calculation and reporting">
    On the same screen, leave the engine mode on its default to have Alguna record finalized invoices and credit notes in Anrok for filing. Switch to **Calculation only** if you file from another source and only want Anrok's rates on your documents.
  </Step>

  <Step title="Check your registrations in Anrok">
    Anrok only collects tax where your seller account has a registration. A calculation for a jurisdiction you are not registered in returns zero tax with the reason `not_collecting`. Add registrations in Anrok, not in Alguna.
  </Step>
</Steps>

### How products map to Anrok

You never map products by hand. Alguna assigns each line a canonical `txcd_…` tax code, either from the product or per line on `POST /tax/calculations`, and creates a matching product in your Anrok account:

| Line                                                          | Product Alguna uses in Anrok                           |
| ------------------------------------------------------------- | ------------------------------------------------------ |
| A line linked to a product in your Alguna catalog             | `alguna-product:<product id>`, one per catalog product |
| Any other line, including every `POST /tax/calculations` line | `alguna:<tax code>`, one per canonical tax code        |

A line without a tax code uses `txcd_business_saas`. The full code list is in [External Tax Providers](/docs/tax/external-tax-providers#tax-code-reference).

Each product is created with the product tax category Alguna considers the default for that code. To change how a code is taxed, open the product in Anrok and change its product tax category there. Alguna never overwrites a category you have set, and re-running provisioning leaves existing products untouched. Products you create in Anrok yourself are not used by Alguna, so tune the `alguna:` and `alguna-product:` products rather than creating new ones.

<Note>
  If a calculation is rejected with `productExternalIdUnknown`, the products for your seller account have not been provisioned yet. Contact [support@alguna.io](mailto:support@alguna.io) with your organization name and we will complete provisioning. Nothing needs to change in Anrok.
</Note>

### Features Included

* Tax is determined on every invoice line, on checkout, and on every `POST /tax/calculations` request, using the customer's address, tax IDs, and the line's tax code. Reverse charge and exemptions are decided by Anrok from the customer's tax IDs and any exemption certificates in your seller account.
* Calculations do not enter your Anrok filings. Only finalized documents are recorded.
* In calculation and reporting mode, issued invoices are recorded in Anrok as transactions, updated when their amounts change, and voided when the invoice is voided. Applied credit notes reduce the recorded invoice, and voided credit notes reverse that reduction. Imported invoices are never recorded.
* Every recorded transaction is listed under **Tax transactions** in the dashboard, with the amount Anrok recorded next to the amount printed on the document.
* Calculations can be read back and run ad hoc through the [Tax](/docs/api-reference/v2/2026-04-01/tax/calculate-tax) endpoints.

### Related

* [External Tax Providers](/docs/tax/external-tax-providers) — the tax code list and how codes are assigned
* [Tax overview](/docs/tax/overview) and [Customer tax rates](/docs/customers/customers-tax-rates) — where customer tax status and IDs are set
* [Stripe Tax](/docs/integrations/sales-tax/stripe-tax) — the other external tax provider
