Sales Tax Calculator

Public

API Details

This API allows you to calculate sales tax rates and amounts for your sales transactions. You can pass in the details of a transaction, including the shipping origin and destination (street, city, state, country), the products sold, and the quantities. The API will then return the appropriate sales tax rates and amounts based on the provided information. This can be particularly useful for e-commerce platforms where sales tax needs to be calculated in real-time during the checkout process.

Request Schema

PropertyTypeRequiredDescription
products
object[]
optional-
name
string
optionalThe name of the product
price
number
optionalThe price of the product
quantity
number
optionalThe quantity of the product sold
shipping_origin
object
optional-
city
string
optionalThe city of the shipping origin
state
string
optionalThe state of the shipping origin
street
string
optionalThe street address of the shipping origin
country
string
optionalThe country of the shipping origin
shipping_destination
object
optional-
city
string
optionalThe city of the shipping destination
state
string
optionalThe state of the shipping destination
street
string
optionalThe street address of the shipping destination
country
string
optionalThe country of the shipping destination

Response Schema

PropertyTypeRequiredDescription
tax_rates
object[]
optional-
rate
number
optionalThe sales tax rate for the jurisdiction
amount
number
optionalThe sales tax amount for the jurisdiction
jurisdiction
string
optionalThe name of the tax jurisdiction (e.g., state, county, city)
total_tax_amount
number
optionalThe total sales tax amount for the transaction

API Metadata

ID381
Version
v1
Method
post
Endpoint

/sales-tax-calculator/v1

Tags
sales tax
tax calculation
tax rates
e-commerce
transaction processing

API Examples

Example Request
{
  "products": [
    {
      "name": "Widget",
      "price": 9.99,
      "quantity": 2
    },
    {
      "name": "Gadget",
      "price": 19.99,
      "quantity": 1
    }
  ],
  "shipping_origin": {
    "city": "Anytown",
    "state": "CA",
    "street": "123 Main St",
    "country": "USA"
  },
  "shipping_destination": {
    "city": "Somewhere",
    "state": "TX",
    "street": "456 Oak Rd",
    "country": "USA"
  }
}
Example Response
{
  "tax_rates": [
    {
      "rate": 0.0775,
      "amount": 1.55,
      "jurisdiction": "State of CA"
    },
    {
      "rate": 0.01,
      "amount": 0.2,
      "jurisdiction": "City of Anytown"
    },
    {
      "rate": 0.0112,
      "amount": 2.23,
      "jurisdiction": "County of Somewhere"
    }
  ],
  "total_tax_amount": 3.98
}