View as Markdown
TaxJar icon

TaxJar ACTION

Calculate Sales Tax

Shows the sales tax that should be collected for a given order. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's TaxJar account once, then configure and run Calculate Sales Tax from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "taxjar-calculate-sales-tax",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    taxjar: { authProvisionId: "apn_xxxxxxx" },
    exemptionType: "Exemption Type",
    fromCountry: "From Country",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Calculate Sales Tax inputs
Property Type Description
exemptionType Exemption Type string
The type of tax exemption for the customer
Required
fromCountry From Country string
The two-letter ISO country code of the country where the order shipped from, i.e.: US
Required
fromZip From Zip string
The postal code where the order shipped from, i.e.: 92093
Required
fromState From State string
The two-letter ISO state code where the order shipped from, i.e.: CA
Required
fromCity From City string
The city where the order shipped from, i.e.: La Jolla
Required
fromStreet From Street string
The street address where the order shipped from, i.e.: 9500 Gilman Drive
Required
toCountry To Country string
The two-letter ISO country code of the country where the order shipped to, i.e.: US
Required
toZip To Zip string
The postal code where the order shipped to, i.e.: 92093
Required
toState To State string
The two-letter ISO state code where the order shipped yo, i.e.: CA
Required
amount Amount string
Total amount of the order, excluding shipping
Required
shipping Shipping string
Total amount of shipping for the order
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
taxjar-calculate-sales-tax
Version
0.0.2
App
TaxJar
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes