AvaTax SDK Node.js

These libraries are open source, and are released as such. If you have located a bug or have questions, please visit the Github repositories that are associated with the sample code and provide feedback there.
Latest SDK version 23.4.1
Installation

Install the package with:

# using npm 
npm install avatax

# using yarn
yarn add avatax
Configuration
View Example
Tax Calculation
View Example
Address Validation
View Example
Release Notes

Please see the Github releases for in-depth release notes.

Typescript Support

As of version 22.11.0, Typescript support is included in the SDK. Models and Enums included in addition to typing for all of the API methods and parameters. The team welcomes any feedback on this feature.

Models and Enums can be imported into Typescript projects as follows:

 import { AddressResolutionModel } from 'avatax/models';
  import { AddressCategoryId } from 'avatax/enums';
SDK Development

Adding integration test credentials

Running integration tests will hit the deployed lower environment

Test credentials are resolved in the following order:

  1. Environment variables

The following environment variables will get loaded as test credentials

  SANDBOX_USERNAME="your-username" 
   SANDBOX_PASSWORD="your-password"     
  1. Local credentials file

You can also add a local credentials file to the the path "<project_root>/local_creds.json". This file will be gitignored

    { 
      "username": "your-username", 
      "password": "your-password" 
      }    
  1. Static (mock) values

The mocked values are used for unit tests via 'nock'.

The test credentials helper can be found here https://github.com/avadev/AvaTax-REST-V2-JS-SDK/blob/master/test/helpers/load_creds.js

Publish tags upstream

  # assuming a tag of v17.5.2 and a remote of 'upstream' 
   git push upstream v17.5.2