Sales Tax API
Core Concepts
Corporations
Calculate
Transactions
- Tax Transactions
- POSTCreate a transaction
- GETGet transaction
- GETList transactions
- DELDelete transaction
- Refund Transactions
- Bulk Transaction Import
Nexus
Registrations
Products
Customers
Exemption Certificates
Calculate tax
curl --request POST \
--url https://base_url/api/v1/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"transaction_type": "SALE",
"discount": 0.99,
"addresses": {
"ship_to": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
},
"ship_from": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
}
},
"customer_details": {
"customer_id": "<string>"
},
"line_items": {
"items": [
{
"line_number": 2,
"product_taxability_code": "TPP",
"quantity": 1.01,
"amount": 1,
"discount": 1,
"product_id": "<string>"
}
]
}
}'
{
"data": {
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"discount": 0.99,
"customer_details": {
"customer_id": "<string>"
},
"tax_currency": "USD",
"addresses": {
"ship_from": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
},
"ship_to": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
}
},
"line_items": [
{
"amount": 123,
"taxable_amount": 123,
"quantity": 123,
"tax_code": "<string>",
"product_id": "<string>",
"effective_tax_rate": 123,
"tax_breakdown": [
{
"jurisdiction": "California",
"jurisdiction_type": "STATE",
"rate": 6.25
}
],
"total_tax_due": 1.03
}
]
},
"message": "Successfully calculated tax."
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The unique identifier for the corporation associated with this transaction.
"b6d009b0-d174-463f-b030-94643c28e209"
ISO 8601 formatted date string indicating date on which the transaction took place.
ISO 4217 alpha-3 currency code for the transaction.
"USD"
Type of the transaction (sale or refund).
SALE
, REFUND
The addresses for this transaction, including shipping origin and destination. If destination address is not set, we will attempt to extract it from the linked customer. If a customer is not linked, or if the linked customer does not have a shipping address, the tax calculation will fail.
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Customer details for this transaction.
Unique identifier for the customer for this transaction. Used for exemptions and for shipping address. If fields on the customer conflict with fields on this calculation, the ones on the calculation will be prioritized.
Array of line items representing individual products or services in the transaction. For each line item either pass the tax_code or the product_id. If the product_id is passed the tax_code will be fetched from the product itself. If no product_taxaiblity_code
is available, TPP
will be used as the fallback.
Quantity of units purchased.
x >= 0.01
Total price for the line item.
x >= 0
Optional line number for this item.
x >= 1
Code passed by the caller to determine taxability for this product. Default value, TPP, will be taxable in every jurisdiction. Additional values are available here.
"TPP"
Discount amount for this line item.
x >= 0
The unique identifier for the product.
Total discount amount applied to the subtotal.
x >= 0
0.99
Response
The unique identifier for the corporation associated with this transaction.
"b6d009b0-d174-463f-b030-94643c28e209"
ISO 8601 formatted date string indicating date on which the transaction took place.
ISO 4217 alpha-3 currency code for the transaction.
"USD"
Total discount amount applied to the transaction.
0.99
Customer details for this transaction.
Unique identifier for the customer for this transaction.
ISO 4217 alpha-3 currency code representing the currency in which tax details are reported.
"USD"
The addresses for this transaction, including shipping origin and destination.
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
"90401"
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
"CA"
ISO 3166 2-letter country code. Ex: US, IN, GB.
"US"
"1776 Main St"
"Apt. #123"
"Santa Monica"
Total price for the line item.
The amount that is considered taxable for this line item.
Quantity of units purchased.
The tax code used for this line item.
The unique identifier for the product.
The effective tax rate applied to this line item.
Name of the taxing jurisdiction.
"California"
Type of tax jurisdiction.
STATE
, COUNTY
, CITY
, SPECIAL_DISTRICT
Tax rate for this jurisdiction as a percentage.
6.25
Total amount of sales tax to charge for line item.
1.03
"Successfully calculated tax."
curl --request POST \
--url https://base_url/api/v1/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"transaction_type": "SALE",
"discount": 0.99,
"addresses": {
"ship_to": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
},
"ship_from": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
}
},
"customer_details": {
"customer_id": "<string>"
},
"line_items": {
"items": [
{
"line_number": 2,
"product_taxability_code": "TPP",
"quantity": 1.01,
"amount": 1,
"discount": 1,
"product_id": "<string>"
}
]
}
}'
{
"data": {
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transaction_date": "2023-12-25",
"transaction_currency": "USD",
"discount": 0.99,
"customer_details": {
"customer_id": "<string>"
},
"tax_currency": "USD",
"addresses": {
"ship_from": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
},
"ship_to": {
"address_line_1": "1776 Main St",
"address_line_2": "Apt. #123",
"address_line_3": "<string>",
"postal_code": "90401",
"city": "Santa Monica",
"state": "CA",
"country": "US"
}
},
"line_items": [
{
"amount": 123,
"taxable_amount": 123,
"quantity": 123,
"tax_code": "<string>",
"product_id": "<string>",
"effective_tax_rate": 123,
"tax_breakdown": [
{
"jurisdiction": "California",
"jurisdiction_type": "STATE",
"rate": 6.25
}
],
"total_tax_due": 1.03
}
]
},
"message": "Successfully calculated tax."
}