Skip to content
Eight Effect-native API SDKs are live.Explore the catalog
Distilled
Esc
navigateopen⌘Jpreview
On this page

Avalara AvaTax SDK

Install, authenticate, and calculate tax with Effect-native AvaTax REST v2 operations.

Public package Swagger 2 470 operations

The AvaTax SDK pins Avalara’s official REST v2 Swagger document and adds only the authentication, error, retry, and client-header behavior that belongs at the provider boundary.

Install

npm install @kevinmichaelchen/distilled-avalara effect
pnpm add @kevinmichaelchen/distilled-avalara effect
bun add @kevinmichaelchen/distilled-avalara effect

Authentication

Variable Purpose
AVALARA_BEARER_TOKEN Preferred bearer credential when available
AVALARA_ACCOUNT_ID + AVALARA_LICENSE_KEY AvaTax account credential pair
AVALARA_BASE_URL Optional endpoint; use https://sandbox-rest.avatax.com for sandbox

Quickstart

Estimate the combined rate for an address:

import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
import {
  CredentialsFromEnv,
  taxRatesByAddress,
} from "@kevinmichaelchen/distilled-avalara";

const AvaTaxLive = Layer.mergeAll(FetchHttpClient.layer, CredentialsFromEnv);

const program = taxRatesByAddress({
  line1: "100 Market Street",
  city: "Philadelphia",
  region: "PA",
  postalCode: "19106",
  country: "US",
});

const rates = await Effect.runPromise(Effect.provide(program, AvaTaxLive));

Source and package

Last updated on July 15, 2026

Was this page helpful?