Theme switcher

Node SDK

The Node.js SDK delivers a modern, promise-based client optimized for JavaScript and TypeScript applications. It provides ergonomic methods for tax rate lookup, jurisdiction determination, and address-level calculations, with full TypeScript type definitions for strong typing and editor autocomplete. Whether you’re building serverless API endpoints, Next.js applications, or high-volume backend services, the Node SDK makes integrating ZipTax fast and straightforward. Use the code samples here to get started.


The Node SDK is currently offered as a Beta product. Please send your comments and suggestions to support@zip.tax.



Implementation Example

1

Install

JavaScript
npm install @ziptax/node-sdk

2

Import

JavaScript
import { ZiptaxError, ZiptaxAPIError, ZiptaxAuthenticationError, ZiptaxValidationError, ZiptaxNetworkError, ZiptaxRateLimitError, } from '@ziptax/node-sdk';

Configure the Client

JavaScript
const client = new ZiptaxClient({ apiKey: 'your-api-key-here', retryOptions: { maxAttempts: 5, initialDelay: 2000, maxDelay: 30000, backoffMultiplier: 2, shouldRetry: (error, attempt) => { // Custom retry logic return attempt < 3 && error.name === 'ZiptaxNetworkError'; }, }, });

4

Get Sales Tax by Address

JavaScript
// Get sales tax rate by address const result = await client.getSalesTaxByAddress({ address: '200 Spectrum Center Drive, Irvine, CA 92618', }); console.log('Total Tax Rate:', result.taxSummaries?.[0]?.rate); console.log('Base Rates:', result.baseRates);

Full documentation available via our GitHub Project at https://github.com/ZipTax/ziptax-node

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Node SDK