PHPackages                             brookside/avalara-tax-rates-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. brookside/avalara-tax-rates-api

ActiveLibrary[API Development](/categories/api)

brookside/avalara-tax-rates-api
===============================

Simple PHP wrapper for Avalara's Tax Rates API

1.1.0(9y ago)09761MITPHPPHP &gt;=5.3.0

Since Jun 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/brooksidestudios/avalara-tax-rates-api)[ Packagist](https://packagist.org/packages/brookside/avalara-tax-rates-api)[ Docs](https://github.com/brooksidestudios/avalara-tax-rates-api)[ RSS](/packages/brookside-avalara-tax-rates-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Avalara Tax Rates API Wrapper
=============================

[](#avalara-tax-rates-api-wrapper)

A simple PHP wrapper for Avalara’s free sales tax rates API.

AvaTax Developer Account Requirements
-------------------------------------

[](#avatax-developer-account-requirements)

You will need to have signed up for an Avalara developer account and API key. More information can be found at [developer.avalara.com/avatax/signup](https://developer.avalara.com/avatax/signup/).

As of **June 15, 2017**, Avalara has retired the free tax rates API that this api was based on. In order to use (or continue using) this API, you will need to signup for a free trial account which will give you continued access to the free tax rates API.

More details from Avalara:

> *“The trial provides 30 days of full AvaTax product functionality in our Sandbox (testing) environment. This includes continuing support for API access to tax rates. After 30 days, the product trial functionality will be limited to the free tax rates API functionality only.”*

Install
-------

[](#install)

Using [Composer](http://getcomposer.org/):

```
composer require brookside/avalara-tax-rates-api:dev-master

```

or just require the `TaxRates.php` file:

```
require 'path/to/TaxRates.php';
```

Usage
-----

[](#usage)

```
use Brookside\TaxRates\TaxRates;

$tr = new TaxRates([
    'username' => 'YOUR_AVALARA_USERNAME',
    'password' => 'YOUR_AVALARA_PASSWORD',
]);
```

Rates can be retrieved from just a postal code:

```
$rates = $tr->getRates(74114);
```

For more accurate rates, you can pass as much address information as you have. All available fields are used below:

```
$rates = $tr->getRates(array(
    'street'  => '4145 E. 21st St',
    'city'    => 'Tulsa',
    'state'   => 'OK',
    'country' => 'USA',
    'postal'  => 74114,
));
```

Results
-------

[](#results)

Results will vary depending on location, but you will always be returned with an array with two keys: `totalRate` and `rates`. The `rates` key will contain up to three rates – for city, state, and county.

Example result:

> *Note that the new API does not include the actual State, County, or City names like the old API did.*

```
Array
(
    [totalRate] => 8.517
    [rates] => Array
        (
            [0] => Array
                (
                    [rate] => 4.5
                    [name] => OK STATE TAX
                    [type] => State
                )

            [1] => Array
                (
                    [rate] => 0.367
                    [name] => OK COUNTY TAX
                    [type] => County
                )

            [2] => Array
                (
                    [rate] => 3.65
                    [name] => OK CITY TAX
                    [type] => City
                )

        )

)

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3302d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/419022?v=4)[cornell](/maintainers/cornell)[@cornell](https://github.com/cornell)

---

Top Contributors

[![cornellsteven](https://avatars.githubusercontent.com/u/429918?v=4)](https://github.com/cornellsteven "cornellsteven (11 commits)")[![brooksidestudios](https://avatars.githubusercontent.com/u/3810357?v=4)](https://github.com/brooksidestudios "brooksidestudios (1 commits)")

---

Tags

taxavalaraAvaTaxtax-rates

### Embed Badge

![Health badge](/badges/brookside-avalara-tax-rates-api/health.svg)

```
[![Health](https://phpackages.com/badges/brookside-avalara-tax-rates-api/health.svg)](https://phpackages.com/packages/brookside-avalara-tax-rates-api)
```

###  Alternatives

[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[taxamo/taxamo-php

Taxamo PHP Library

10120.0k](/packages/taxamo-taxamo-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
