This is a barebones JavaScript sample demonstrating the AvaTax REST API methods: tax/get POST, tax/get GET, tax/cancel POST, and address/validate GET. Calculation output is minimally parsed and output to the browser.
For more information on the use of these methods and the AvaTax product, please visit our developer site or homepage
- PHP 5.0 or later
- Authentication requires an valid Account Number and License Key, which should be entered in AvaTax.php
- If you do not have an AvaTax account, a free trial account can be acquired through our developer site
Sample Files | |
---|---|
CancelTaxTest.html | Demonstrates the CancelTax method used to void a document. |
EstimateTaxTest.html | Demonstrates the EstimateTax method used for product- and line- indifferent tax estimates. |
GetTaxTest.html | Demonstrates the GetTax method used for product- and line- specific calculation. |
PingTest.html | Uses a hardcoded EstimateTax call to test connectivity and credential information. |
ValidateAddressTest.html | Demonstrates the ValidateAddress method to normalize an address. |
Other Files | |
AvaTax.js | Contains the core classes and builds method-specific URIs, etc to call the service with AvaTax.php. |
AvaTax.php | Provides a server-side php proxy to make the service calls, contains the AvaTax account credentials used for all calls. |
.gitattributes | - |
.gitignore | - |
LICENSE.md | - |
README.md | - |