PHPackages                             avalara/avatax - 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. avalara/avatax

ActiveLibrary[API Development](/categories/api)

avalara/avatax
==============

A set of classes to assist with integration to the Avalara AvaTax SOAP API.

15.5.2(9y ago)0949.0k↓43.2%[3 issues](https://github.com/avadev/AvaTax-Calc-SOAP-PHP/issues)[1 PRs](https://github.com/avadev/AvaTax-Calc-SOAP-PHP/pulls)1PHPPHP &gt;=5.3.0

Since Oct 3Pushed 3y agoCompare

[ Source](https://github.com/avadev/AvaTax-Calc-SOAP-PHP)[ Packagist](https://packagist.org/packages/avalara/avatax)[ RSS](/packages/avalara-avatax/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)DependenciesVersions (5)Used By (1)

AvaTax-Calc-SOAP-PHP
====================

[](#avatax-calc-soap-php)

[Other Samples](http://developer.avalara.com/api-docs/api-sample-code)

This is a PHP sample demonstrating the [AvaTax SOAP API](http://developer.avalara.com/api-docs/soap). For more information on the use of these methods and the AvaTax product, please visit our [developer site](http://developer.avalara.com/) or [homepage](http://www.avalara.com/)

Dependencies:
-------------

[](#dependencies)

- PHP 5.3 or later (not tested on versions older than PHP 5.3)

Requirements:
-------------

[](#requirements)

- Authentication requires an valid **Account Number** and **License Key**, which should be entered in the test file (e.g. GetTaxTest.php) you would like to run.
- If you do not have an AvaTax account, a free trial account can be acquired through our [developer site](http://developer.avalara.com/api-get-started)
- **SSL** and **SoapClient** support must be enabled for your PHP interpreter. For windows, add the following extentions to php.ini:

```
extension=php_soap.dll
extension=php_openssl.dll

```

Note: For \*nix, it may be necessary to recompile your PHP interpreter with soap.dll and openssl.dll enabled.

- If you would like to use these core classes as part of a project and manage your depencies through [composer](https://getcomposer.org/), the Avatax classes can be added to your existing project by adding

```
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/avadev/AvaTax-Calc-SOAP-PHP"
        }
    ],
    "require": {
        "avalara/avatax": "*"
    }

```

to your composer.json file and run `php composer.phar update` from your command line.

Contents:
---------

[](#contents)

   **File**

 **Method Demonstrated**

   **Samples/Credentials.php** contains authentication elements (URL, Account, LicenseKey, Client) that are passed into the ATConfig object which ontains various service configuration parameters as class static variables.    **Samples/IsAuthorizedTest.php**  IsAuthorized is a method that allows the user to specify a number of a methods or services to ascertain if they are permitted to use them based on the credentials provided in the request.   **Samples/PingTest.php**  The Ping method can be used for testing connectivity to the AvaTax web service, verify supplied credentials, and return the service version in use by the AvaTax web service.    **Samples/ValidateTest.php** Validate demonstrates the [ValidateAddress](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-Validate) method that [normalizes a provided address](http://developer.avalara.com/api-docs/api-reference/address-validation). US and Canada only.   **Samples/GetTaxRequestTest.php**  The [GetTaxRequest](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-GetTax) method calculates retail sales tax on documents such as sales orders, sales invoices, purchase orders, purchase invoices, or credit memos. **Note:** A document can be committed at this stage by setting the *Commit* property to *true* (default is *false*).   **Samples/PostTaxTest.php**  The [PostTax](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-PostTax) method can be used to modify the state of a SalesInvoice, ReturnInvoice or PurchaseInvoice document saved to the AvaTax database. **Note:** A document can be committed at this stage by setting the Commit property to true (default is false).   **Samples/CommitTaxTest.php** The CommitTax method can be used to modify the state of a document that is "*posted*" (only) to the AvaTax database via SalesInvoice, ReturnInvoice or PurchaseInvoice a methods. **Note:** CommitTax is not a required step to commit a document to AvaTax. Documents can be committed during the GetTax or PostTax document lifecycle.    **Samples/GetTaxHistoryTest.php** [GetTaxHistory](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-GetTaxHistory) is a method that retrieves details from a previously saved (to the AvaTax database) documents.   **Samples/AdjustTaxTest.php** AdjustTax is a method that has the ability to modify elements of an *already committed document*. **Note:** Sets the *Document Modified* flag.   **Samples/CancelTaxTest.php** [CancelTax](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-CancelTax) is a method that cancels a tax document specified by the DocId, DocCode, and DocType parameters. See [CancelTax](http://developer.avalara.com/api-docs/avalara-avatax-api-reference#cat-CancelTax) for more details.   **/AvaTax** *../AvaTax is a Directory* containing the core classes that enable the API samples to make Avatax web service calls.   #### **Other Files Included in this Repository**

[](#other-files-included-in-this-repository)

   ***.gitattributes*** *GitHub attribute file. Not required for sample use.*   ***.gitignore*** *GitHub config file. Not required for sample use.*   **LICENSE.md** Apache License TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION   **README.md** This document describing how to make use of the sample API code.   **composer.json** Allows for composer management of packages.  #### **Resources**

[](#resources--)

Developer API Documentation is located here:

The Avalara AvaTax API Reference is located here:

Find out what other developers are talking about on the *Avalara Developer Community Forum* located here: [https://community.avalara.com/avalara/category\_sets/developers](https://community.avalara.com/avalara/category_sets/developers)

Frequently asked questions regarding the Avalara product is located here:

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 83.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

Every ~321 days

Total

4

Last Release

3302d ago

Major Versions

14.4.4 → 15.5.12016-04-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8c8793e70195b60732316934fcbf3cde3b93f5c24ec75f729be42013fce85a2?d=identicon)[Avalara](/maintainers/Avalara)

---

Top Contributors

[![longlet](https://avatars.githubusercontent.com/u/2373749?v=4)](https://github.com/longlet "longlet (36 commits)")[![ted-spence-avalara](https://avatars.githubusercontent.com/u/3342295?v=4)](https://github.com/ted-spence-avalara "ted-spence-avalara (2 commits)")[![gandazgul](https://avatars.githubusercontent.com/u/108850?v=4)](https://github.com/gandazgul "gandazgul (1 commits)")[![LeeSaferite](https://avatars.githubusercontent.com/u/47386?v=4)](https://github.com/LeeSaferite "LeeSaferite (1 commits)")[![erikhansen](https://avatars.githubusercontent.com/u/129031?v=4)](https://github.com/erikhansen "erikhansen (1 commits)")[![paulmlewis](https://avatars.githubusercontent.com/u/7457693?v=4)](https://github.com/paulmlewis "paulmlewis (1 commits)")[![SeanRustAvalara](https://avatars.githubusercontent.com/u/3788950?v=4)](https://github.com/SeanRustAvalara "SeanRustAvalara (1 commits)")

### Embed Badge

![Health badge](/badges/avalara-avatax/health.svg)

```
[![Health](https://phpackages.com/badges/avalara-avatax/health.svg)](https://phpackages.com/packages/avalara-avatax)
```

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90923.5M35](/packages/facebook-php-business-sdk)[exsyst/swagger

A php library to manipulate Swagger specifications

35916.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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