> ## 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.

# External Tax Providers

> Automatic tax determination via Anrok or Stripe Tax, driven by tax codes

# External Tax Providers

Instead of maintaining rules yourself, you can connect a specialized tax engine. The engine determines the correct rate across country, state, county, and city jurisdictions from each line's tax code and the customer's location, and keeps rates and nexus rules current for you.

## Supported Engines

| Engine         | Notes                                                                                       |
| -------------- | ------------------------------------------------------------------------------------------- |
| **Anrok**      | Sales-tax and VAT/GST determination for digital goods and SaaS.                             |
| **Stripe Tax** | Automatic tax calculation via Stripe. See [Stripe Tax](/docs/integrations/sales-tax/stripe-tax). |

## How It Works

With an external provider connected, Alguna does not apply your tax rules. Instead, for every invoice line it sends the line's tax code and the customer's address to the engine, which returns the tax amount and the per-jurisdiction breakdown.

You assign a canonical tax code to each product (or pass one per line via the API). You never deal with an engine's raw codes directly. Alguna translates the canonical code into whichever provider you have configured, so switching engines requires no re-coding of your catalogue.

## Tax Codes

Alguna owns a provider-neutral tax-code taxonomy. Each code is a `txcd_...` identifier that captures both the product category and the audience:

* **Audience is part of the code.** Most categories come as a `txcd_business_*` / `txcd_consumer_*` pair. Pick the one matching who you sell to, since taxability can differ.
* **Default.** `txcd_business_saas` is the default. A line with no tax code resolves here.
* **Exempt.** `txcd_exempt` marks a line as not subject to tax.

<Note>
  You only ever supply the canonical `txcd_...` code. Alguna maps it to the configured provider's native code for you.
</Note>

## Tax Code Reference

The taxonomy is exhaustive. Every canonical code Alguna recognises is listed below.

| Canonical code                                | Description                                          |
| --------------------------------------------- | ---------------------------------------------------- |
| `txcd_business_saas` *(default)*              | SaaS - General (business)                            |
| `txcd_consumer_saas`                          | SaaS - General (consumer)                            |
| `txcd_business_saas_security`                 | SaaS - Security (business)                           |
| `txcd_consumer_saas_security`                 | SaaS - Security (consumer)                           |
| `txcd_business_saas_storage`                  | SaaS - Storage (business)                            |
| `txcd_consumer_saas_storage`                  | SaaS - Storage (consumer)                            |
| `txcd_software_onprem`                        | SaaS - On-prem                                       |
| `txcd_business_paas`                          | PaaS - General (business)                            |
| `txcd_consumer_paas`                          | PaaS - General (consumer)                            |
| `txcd_business_iaas`                          | IaaS - General (business)                            |
| `txcd_consumer_iaas`                          | IaaS - General (consumer)                            |
| `txcd_business_web_hosting`                   | Web hosting (business)                               |
| `txcd_consumer_web_hosting`                   | Web hosting (consumer)                               |
| `txcd_business_domain_names`                  | Domain name sales (business)                         |
| `txcd_consumer_domain_names`                  | Domain name sales (consumer)                         |
| `txcd_business_software_download`             | Downloaded software (business)                       |
| `txcd_consumer_software_download`             | Downloaded software (consumer)                       |
| `txcd_business_software_maintenance_optional` | Software maintenance automated - optional (business) |
| `txcd_consumer_software_maintenance_optional` | Software maintenance automated - optional (consumer) |
| `txcd_business_digital_subscription`          | Digital goods (subscription) - General (business)    |
| `txcd_consumer_digital_subscription`          | Digital goods (subscription) - General (consumer)    |
| `txcd_business_gaming_subscription`           | Gaming - subscription (business)                     |
| `txcd_consumer_gaming_subscription`           | Gaming - subscription (consumer)                     |
| `txcd_business_video_subscription`            | Video - subscription (business)                      |
| `txcd_consumer_video_subscription`            | Video - subscription (consumer)                      |
| `txcd_business_photography_subscription`      | Photography - subscription (business)                |
| `txcd_consumer_photography_subscription`      | Photography - subscription (consumer)                |
| `txcd_business_music_subscription`            | Music - subscription (business)                      |
| `txcd_consumer_music_subscription`            | Music - subscription (consumer)                      |
| `txcd_business_ebook_subscription`            | E-books - subscription (business)                    |
| `txcd_consumer_ebook_subscription`            | E-books - subscription (consumer)                    |
| `txcd_business_in_app_subscription`           | Digital tokens/in-app - subscription (business)      |
| `txcd_consumer_in_app_subscription`           | Digital tokens/in-app - subscription (consumer)      |
| `txcd_business_dataset_subscription`          | Data sets - subscription (business)                  |
| `txcd_consumer_dataset_subscription`          | Data sets - subscription (consumer)                  |
| `txcd_business_digital_permanent`             | Digital goods (permanent) - General (business)       |
| `txcd_consumer_digital_permanent`             | Digital goods (permanent) - General (consumer)       |
| `txcd_business_gaming_permanent`              | Gaming - permanent (business)                        |
| `txcd_consumer_gaming_permanent`              | Gaming - permanent (consumer)                        |
| `txcd_business_video_permanent`               | Video - permanent (business)                         |
| `txcd_consumer_video_permanent`               | Video - permanent (consumer)                         |
| `txcd_business_photography_permanent`         | Photography - permanent (business)                   |
| `txcd_consumer_photography_permanent`         | Photography - permanent (consumer)                   |
| `txcd_business_music_permanent`               | Music - permanent (business)                         |
| `txcd_consumer_music_permanent`               | Music - permanent (consumer)                         |
| `txcd_business_nft`                           | NFTs (business)                                      |
| `txcd_consumer_nft`                           | NFTs (consumer)                                      |
| `txcd_business_ebook_permanent`               | E-books - permanent (business)                       |
| `txcd_consumer_ebook_permanent`               | E-books - permanent (consumer)                       |
| `txcd_business_in_app_permanent`              | Digital tokens/in-app - permanent (business)         |
| `txcd_consumer_in_app_permanent`              | Digital tokens/in-app - permanent (consumer)         |
| `txcd_business_dataset_permanent`             | Data sets - permanent (business)                     |
| `txcd_consumer_dataset_permanent`             | Data sets - permanent (consumer)                     |
| `txcd_business_digital_advertising`           | Digital advertising (business)                       |
| `txcd_consumer_digital_advertising`           | Digital advertising (consumer)                       |
| `txcd_exempt`                                 | Exempt                                               |
