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
{ "type": "object", "properties": { "products": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "label": "Product Name", "description": "The name of the product" }, "price": { "type": "number", "label": "Product Price", "description": "The price of the product" }, "quantity": { "type": "number", "label": "Product Quantity", "description": "The quantity of the product sold" } } } }, "shipping_origin": { "type": "object", "properties": { "city": { "type": "string", "label": "Shipping Origin City", "description": "The city of the shipping origin" }, "state": { "type": "string", "label": "Shipping Origin State", "description": "The state of the shipping origin" }, "street": { "type": "string", "label": "Shipping Origin Street", "description": "The street address of the shipping origin" }, "country": { "type": "string", "label": "Shipping Origin Country", "description": "The country of the shipping origin" } } }, "shipping_destination": { "type": "object", "properties": { "city": { "type": "string", "label": "Shipping Destination City", "description": "The city of the shipping destination" }, "state": { "type": "string", "label": "Shipping Destination State", "description": "The state of the shipping destination" }, "street": { "type": "string", "label": "Shipping Destination Street", "description": "The street address of the shipping destination" }, "country": { "type": "string", "label": "Shipping Destination Country", "description": "The country of the shipping destination" } } } } }
Response Schema
{ "type": "object", "properties": { "tax_rates": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number", "label": "Tax Rate", "description": "The sales tax rate for the jurisdiction" }, "amount": { "type": "number", "label": "Tax Amount", "description": "The sales tax amount for the jurisdiction" }, "jurisdiction": { "type": "string", "label": "Tax Jurisdiction", "description": "The name of the tax jurisdiction (e.g., state, county, city)" } } } }, "total_tax_amount": { "type": "number", "label": "Total Tax Amount", "description": "The total sales tax amount for the transaction" } } }
API Metadata
381
1
sales tax
tax calculation
tax rates
e-commerce
transaction processing
API Examples
{ "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" } }
{ "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 }