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
Create a transaction
Submit a completed transaction for processing and filing
curl --request POST \
--url https://base_url/api/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transacted_at": "2023-12-25",
"customer_details": {
"shipping_address": {
"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_id": "<string>"
},
"invoice_currency": "USD",
"subtotal": 10.99,
"discount": 0.99,
"shipping_and_handling": 0,
"total": 10.99,
"line_items": {
"items": [
{
"amount": 123,
"quantity": 123,
"tax_code": "TPP",
"product_id": "<string>",
"external_id": "<string>"
}
]
},
"tax_collected": 123,
"invoice_type": "SALE",
"source_platform": "RAZORPAY"
}'
{
"data": {
"id": "2535af08-a139-4d0c-9827-1651e46dfbcf",
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transacted_at": "2023-12-25",
"customer_details": {
"shipping_address": {
"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_id": "<string>"
},
"invoice_currency": "USD",
"subtotal": 10.99,
"discount": 0.99,
"shipping_and_handling": 0,
"total": 10.99,
"line_items": {
"items": [
{
"amount": 123,
"quantity": 123,
"tax_code": "TPP",
"product_id": "<string>",
"external_id": "<string>"
}
]
},
"tax_collected": 123,
"transaction_status": "LOCKED",
"invoice_type": "SALE",
"source_platform": "RAZORPAY"
},
"message": "Successfully created transaction."
}
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.
ISO 8601 formatted date string indicating date on which the transaction took place. If tax calculations need to be based on a different date, please contact our team for assistance.
Customer details for this transaction.
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
ISO 3166 2-letter country code. Ex: US, IN, GB.
Optional unique identifier for the customer. If provided, it may be used to retrieve defaults configured for the customers. Any explicitly provided customer details will take precedence over stored defaults.
ISO 4217 alpha-3 currency code for the transaction.
Total amount before tax, shipping, handling, and discounts.
This is the total amount charged to the customer, which includes the subtotal, shipping and handling fees, tax, and reflects any applied discounts.
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.
Total price for the line item, including any discounts and shipping and handling costs.
Quantity of units purchased.
Code passed by the caller to determine taxability for this product. Default value, TPP, will be taxable in every jurisdiction. Reach out to the Commenda team for alternative product codes.
The unique identifier for the product getting sold in this line item. Not required if tax code is passed.
An external ID that may be applied to the line item.
Numeric value representing the amount of sales tax paid by the customer for this transaction
Type of the transaction. Currently sales and refund transactions are supported.
SALE
, REFUND
Total discount amount applied to the subtotal.
Total shipping and handling charges.
The platform from which the transaction originated. This is useful for tracking transactions from different platforms.
RAZORPAY
, OTHER
Response
The unique identifier for the corporation associated with this transaction.
ISO 8601 formatted date string indicating date on which the transaction took place. If tax calculations need to be based on a different date, please contact our team for assistance.
Customer details for this transaction.
Either 5-digit ZIP code or 9-digit ZIP+4 code is accepted.
2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY, TX.
ISO 3166 2-letter country code. Ex: US, IN, GB.
Optional unique identifier for the customer. If provided, it may be used to retrieve defaults configured for the customers. Any explicitly provided customer details will take precedence over stored defaults.
ISO 4217 alpha-3 currency code for the transaction.
Total amount before tax, shipping, handling, and discounts.
This is the total amount charged to the customer, which includes the subtotal, shipping and handling fees, tax, and reflects any applied discounts.
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.
Total price for the line item, including any discounts and shipping and handling costs.
Quantity of units purchased.
Code passed by the caller to determine taxability for this product. Default value, TPP, will be taxable in every jurisdiction. Reach out to the Commenda team for alternative product codes.
The unique identifier for the product getting sold in this line item. Not required if tax code is passed.
An external ID that may be applied to the line item.
Numeric value representing the amount of tax paid by the customer for this transaction
Type of the transaction. Currently sales and refund transactions are supported.
SALE
, REFUND
The unique identifier for a transaction.
Total discount amount applied to the subtotal.
Total shipping and handling charges.
Transactions are created in UNCOMMITTED state. In this state they can be updated or deleted. Transactions become locked and can't be edited once they've been reported on a filed return.
LOCKED
, UNCOMMITTED
The platform from which the transaction originated. This is useful for tracking transactions from different platforms.
RAZORPAY
, OTHER
curl --request POST \
--url https://base_url/api/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transacted_at": "2023-12-25",
"customer_details": {
"shipping_address": {
"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_id": "<string>"
},
"invoice_currency": "USD",
"subtotal": 10.99,
"discount": 0.99,
"shipping_and_handling": 0,
"total": 10.99,
"line_items": {
"items": [
{
"amount": 123,
"quantity": 123,
"tax_code": "TPP",
"product_id": "<string>",
"external_id": "<string>"
}
]
},
"tax_collected": 123,
"invoice_type": "SALE",
"source_platform": "RAZORPAY"
}'
{
"data": {
"id": "2535af08-a139-4d0c-9827-1651e46dfbcf",
"corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
"transacted_at": "2023-12-25",
"customer_details": {
"shipping_address": {
"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_id": "<string>"
},
"invoice_currency": "USD",
"subtotal": 10.99,
"discount": 0.99,
"shipping_and_handling": 0,
"total": 10.99,
"line_items": {
"items": [
{
"amount": 123,
"quantity": 123,
"tax_code": "TPP",
"product_id": "<string>",
"external_id": "<string>"
}
]
},
"tax_collected": 123,
"transaction_status": "LOCKED",
"invoice_type": "SALE",
"source_platform": "RAZORPAY"
},
"message": "Successfully created transaction."
}