# taxjar/module-taxjar

> TaxJar Sales Tax Module for Magento 2

`composer require taxjar/module-taxjar`

Canonical URL: https://packagento.com/taxjar/module-taxjar

## At a glance

- **Vendor**: taxjar (https://packagento.com/taxjar.md)
- **Latest version**: 4.0.1 — released 2025-09-05
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/taxjar/module-taxjar and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require taxjar/module-taxjar:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

TaxJar Sales Tax Module for Magento 2

## README

Simplify your sales tax with live checkout calculations and zip-based backup rates from [TaxJar](http://www.taxjar.com).

To get started, check out our [M2 extension guide](http://www.taxjar.com/guides/integrations/magento2/)!

### Getting Started

Download the extension as a ZIP file from this repository or install our module with [Composer](https://getcomposer.org/) using the following command:

```
composer require taxjar/module-taxjar
```

If you're installing the extension manually, unzip the archive and upload the files to `/app/code/Taxjar/SalesTax`. After uploading, run the following [Magento CLI](http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands.html) commands:

```
bin/magento module:enable Taxjar_SalesTax --clear-static-content
bin/magento setup:upgrade
bin/magento setup:di:compile
```

These commands will enable the TaxJar extension, perform necessary database updates, and re-compile your Magento store. From there, you'll want to run through the pre-import checklist and set everything up using our [extension guide](http://www.taxjar.com/guides/integrations/magento2/)).

### Tests

To run our integration tests for checkout calculations, clone the repository into your local instance of Magento 2. You'll need an active TaxJar API token (preferably a test account) to run these tests.

```
git clone https://github.com/taxjar/taxjar-magento2-extension.git app/code/Taxjar/SalesTax
```

Backup or rename your existing `phpunit.xml` under `dev/tests/integration`. Copy the `phpunit.xml file` in the TaxJar module under `app/code/Taxjar/SalesTax/Test/Integration`:

```
cp app/code/Taxjar/SalesTax/Test/Integration/phpunit.xml dev/tests/integration/phpunit.xml
```

Rename `install-config-mysql.php.dist` to `install-config-mysql.php` under `dev/tests/integration/etc`. Make sure Magento has access to a MySQL database for running integration tests.

Copy `Test/Integration/credentials.php.dist` to `credentials.php` in the same directory and add your TaxJar API token:

```
cp app/code/Taxjar/SalesTax/Test/Integration/credentials.php.dist app/code/Taxjar/SalesTax/Test/Integration/credentials.php
```

Finally, run the TaxJar test suite using PHPUnit:

```
vendor/bin/phpunit -c ~/OSS/magento2/dev/tests/integration/phpunit.xml --testsuite “Taxjar”
```

Notice that the configuration flag should include the full path to `phpunit.xml`.

### License

TaxJar's Magento 2 module is released under the [Open Software License 3.0](https://opensource.org/licenses/OSL-3.0) (OSL-3.0).

### Support

If you find a bug in our extension, [open a new issue](https://github.com/taxjar/taxjar-magento2-extension/issues/new) right here in GitHub. For general questions about TaxJar or specific issues with your store, please [contact us](http://www.taxjar.com/contact/) after going through our extension guide.

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### [Unreleased]

### [4.0.1] - 2025-08-25
#### Fixed
- Added PHP 8.4 compatibility for Magento 2.4.8 support
- Resolved PHP 8.4 compatibility issues in core extension files

### [4.0.0] - 2025-08-25 (Marketplace submission canceled)
- Add support for Magento 2.4.8 with framework ^103.0.8
- Add PHP 8.3 compatibility (drops PHP 8.2 support)
- Add PHPUnit 10.* compatibility
- Fix Braintree module double-prefixing bug in sales grid filters

### [3.0.0] - 2025-04-24
- Fix issue with uncreated customer attributes

### [2.2.0] - 2023-07-12
- Replace Zend_Http_Client with Magento\Framework\HTTP\LaminasClient

### [2.1.0] - 2023-01-11
- Fix regression in TaxJar customer sync
- Modify for public access to Transaction getProvider method

### [2.0.0] - 2022-10-03
- Drops support for deprecated Magento version 2.3
- Fix issue filtering sales grid by created at dates
- Fix issue with config cleanup on disconnect from TaxJar with Sandbox mode enabled
- Fix issue with non-synced, but syncable orders not rending sync button JS

### [1.9.9] - 2022-08-04
- Fix QuoteManager plugin to handle unsuccessful order placement in 'after' method

### [1.9.8] - 2022-07-20
- Fix issue with custom Cart Interface implementations
- Fix issue with US (5+4) postcode validation

### [1.9.7] - 2022-06-28
- Fix issue with exempt regions in customer CSV import
- Fix issue with postal code sanitation in address validation

### [1.9.6] - 2022-05-27
- Fix issue with missing order metadata

### [1.9.5] - 2022-05-16
- Fix issue with removing EAV attributes on uninstall

### [1.9.4] - 2022-05-02
- Fix issue with scoped address validation
- Fix issue with scoped sales order sync button

### [1.9.3] - 2022-04-13
- Fix nexus sync address duplication bug
- Fix sales order item PTC bug for configurable products
- Fix scoped refund sync observer bug
- Refactor tax calculation with request setter method

### [1.9.2] - 2022-03-23
- Refactor queue configuration for AMQP compatibility
- Fix missing vendor dependency bug
- Fix admin sales order view bug when missing order state
- Fix authenticated customer's validated shipping address phone number bug

### [1.9.1] - 2022-03-10
- PHP 8.1 compatibility
- Updates for Magento coding standards

### [1.9.0] - 2022-02-28
- Adds additional logging visibility in Sales Order UI
- Fix Nexus region import bug for TaxJar's non-standard ISO codes
- Fix transaction backfill CLI command's date input bug
- Fix missing DI preference for DriverInterface in some installations
- Extend compatibility for older Magento 2.3 versions
- Migrate to declarative schema
- Update documentation URLs, issue template

### [1.8.0] - 2021-12-06
- Improve transaction backfill by making process asynchronous
- Add "force sync" feature to transaction sync and transaction backfill
- Fix address validation issues when checking out as existing user (thanks @sanchit-redmonks)
- Fix creditmemo transaction sync bug of no-cost line item
- Fix issue parsing partial creditmemo discounts and order invoiced amounts

### [1.7.1] - 2021-11-08
- Fix minor code standards issue

### [1.7.0] - 2021-10-06
- Improve backup rate sync by making process asynchronous

### [1.6.5] - 2021-07-08
- Fix issue preventing export of credit memos
- Fix address validation issues when creating an order in admin
- Add support for validating saved address at checkout
- Fix address validation issue when switching between addresses at checkout

### [1.6.4] - 2021-06-16
- Fix issue with address validation

### [1.6.3] - 2021-05-11
- Fix backup rates when using international store shipping address
- Fix address validation for Magento 2.4

### [1.6.2] - 2021-03-30
- Fix incorrect subtotal due to rounding

_(Changelog truncated for .md surface. Full history on https://packagento.com/taxjar/module-taxjar.)_

## Recent Versions

| Version | Released |
|---|---|
| 4.0.1 | 2025-09-05 |
| 2.2.0 | 2023-07-17 |
| 2.1.0 | 2023-01-12 |
| 2.0.0 | 2022-10-04 |
| 1.9.9 | 2022-08-05 |
| 1.9.8 | 2022-07-20 |
| 1.9.7 | 2022-07-01 |
| 1.9.6 | 2022-05-27 |
| 1.9.5 | 2022-05-16 |
| 1.9.4 | 2022-05-02 |

Showing 10 of 66 versions. Full release history on https://packagento.com/taxjar/module-taxjar.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | ^103.0.8 |

## Quality

Latest release (4.0.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | not tested | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 81 | 81 warnings (ruleset: Magento2) |
| PHPMD | Warning | 82 | 82 rule violations (MissingImport:28, UnusedFormalParameter:12, IfStatementAssignment:6, UnusedLocalVariable:5, ExcessiveClassComplexity:5) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | 194 | 194 | – |
| 2.4.9 | – | – | 194 | 194 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | Error | Error | – |
| 2.4.9 | – | – | Error | Error |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["taxjar/module-taxjar"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

taxjar is a Magento 2 vendor on Packagento. See https://packagento.com/taxjar.md for their full catalogue.

