Use the calculation object to get tax rates with enhanced B2B support
The calculation object contains tax rate information with enhanced support for business-to-business (B2B) transactions. A calculation also includes a calculation_id that you’ll use to record a transaction for filing.
Calculations should be used any time you need to calculate sales tax before charging a customer for a transaction. Most e-commerce clients will submit a POST to /tax/calculations during their checkout flow after the end customer has submitted their address, but before collecting payment.
We return both the aggregate tax information as well as a detailed breakdown for each line item. Many users will just use the total_tax_amount to identify what to charge a user, but you will always have the details as you need them.
{ "order_details": { "customer_currency_code": "GBP", // Supports 32 currencies "tax_included_in_amount": false, "automatic_tax": "auto", // New field for tax control "line_items": [ { "reference_line_item_id": "line_123456789", // Optional "reference_product_id": "p-1233543", // Required if no product_category "product_category": "SAAS_GENERAL", // Required if no reference_product_id "amount": 200, // In currency's smallest unit (e.g., cents for USD, whole units for JPY) "quantity": 2 } ] }}
New Fields in 2025-05-12:
automatic_tax (string): Controls tax collection and registration behavior
auto - Return tax rates everywhere you have an active registration
disabled - Always return 0 tax regardless of thresholds
The 2025-05-12 version introduces business-to-business (B2B) tax logic through customer types:
BUSINESS customers: Must provide valid tax IDs (except for US-based calculations), enabling B2B tax exemptions and reverse charge mechanisms in applicable jurisdictions
CONSUMER customers: Standard B2C tax calculations without tax ID requirements. This is the default if the type field is omitted.
The 2025-05-12 version supports 32 currencies (22 additional beyond the original 10), enabling global tax calculations across major markets including GBP, AUD, JPY, SGD, and many others.
Starting with API version 2026-03-01, you can provide a customer IP address instead of a full street address. The API will geo-resolve the IP to determine the taxable location.