Skip to content

avadev/AvaTax-Calc-REST-JavaScript

Repository files navigation

AvaTax-REST-JavaScript

Other Samples

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

Dependencies:

  • PHP 5.0 or later

Requirements:

  • 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

Contents:

Sample Files
CancelTaxTest.htmlDemonstrates the CancelTax method used to void a document.
EstimateTaxTest.htmlDemonstrates the EstimateTax method used for product- and line- indifferent tax estimates.
GetTaxTest.htmlDemonstrates the GetTax method used for product- and line- specific calculation.
PingTest.htmlUses a hardcoded EstimateTax call to test connectivity and credential information.
ValidateAddressTest.htmlDemonstrates the ValidateAddress method to normalize an address.
Other Files
AvaTax.jsContains the core classes and builds method-specific URIs, etc to call the service with AvaTax.php.
AvaTax.phpProvides 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-