Calculate
Tax Calculations
Calculates the tax amount for a given transaction.
Overview
The /calculate
endpoint allows you to determine the amount of sales tax to charge on a transaction. By providing details such as customer information, line items, and pricing, you’ll receive accurate tax calculations based on applicable jurisdictions and rates.
Factors Affecting Tax Rates
Our system considers the following factors to determine the appropriate tax for a transaction:
-
Seller Information
- State Registrations:
- If your corporation is not registered to pay taxes in a state, the
/calculate
endpoint will return a tax amount of 0 for that state. - If your corporation is registered in a state, we calculate the tax amount based on that state’s rates and rules.
- If your corporation is not registered to pay taxes in a state, the
- State Registrations:
-
Product-Specific Information
- Product Taxability:
- Product Configuration: Each corporation can define and manage its product catalog via our
/products
endpoints. (Coming soon) - Product Code Assignment: For every product in the catalog, you can assign a specific product code using the API.
- Tax Rate Computation: When the
/calculate
endpoint is called, each line item includes a product id. We use this id to retrieve the pre-configured product code for that product, determining its taxability for the transaction.- If a product is classified as non-taxable based on its product code, the tax amount for that specific line item will be 0.
- If a product is taxable, the tax is calculated based on the product’s price and applicable tax rates.
- Product Configuration: Each corporation can define and manage its product catalog via our
- Product Taxability:
-
Customer Information
- Shipping Address: We compute the tax rate based on the shipping address provided for each transaction.
- Customer Exemptions: Transactions can be exempted from sales tax based on properties of the customer making the purchase. You can read more about these exemptions here.
Sample Calculation Object
The /calculate
endpoint returns a JSON object containing the transaction details and calculated taxes.
Example response: