Skip to main content
POST
Calculate taxes for marketplace/platform transactions where a merchant (seller) is involved. This endpoint is designed for marketplaces, payment processors, and other platforms that facilitate transactions between buyers and sellers.

Headers

string
required
Bearer token authentication.
string
required
Must be 2026-03-01 for platform calculations.

Request Body

object
required
The customer (buyer) information.
object
required
The merchant (seller) involved in this transaction.
object
required
Order details including line items.
array
required
Your role(s) in this transaction. One or more of:
  • marketplace_provider - You operate a marketplace connecting buyers and sellers
  • payment_processor - You process payments for the transaction
  • merchant_of_record - You are the legal seller of record
object
Optional: Details for platform fees to be taxed separately. Same structure as order_details, except automatic_tax only accepts auto or disabled — fees represent the platform’s own tax event toward the merchant and must honor the platform’s own nexus configuration.
integer
Optional. The time the transaction occurred, as a Unix timestamp in seconds. Used to determine which tax rates and rules apply at the time of the transaction (for example, during a sales tax holiday). If omitted, the calculation uses the current time.

Line Item Properties

integer
required
Per-unit price in the smallest currency unit (e.g., cents for USD).For a $25.00 item: amount: 2500
integer
required
Number of units. The taxable base = amount × quantity.
string
Tax category code (e.g., GENERAL_MERCHANDISE, SAAS_GENERAL).
string
Reference to a pre-created product.
string
Your ID for this line item.

Response

string
The calculation ID.
string
Always tax.calculation.
array
Tax calculations for order line items.
array
Tax calculations for fee line items (only present when fee_details provided).
object
Summary totals for order and fees.
object
The merchant used in this calculation.
array
The roles you specified.

Enhanced Response Fields

Platform calculations include additional tax jurisdiction details:
string
Name of the tax authority (e.g., “California State”).
string
Type of authority: STATE, COUNTY, CITY, or DISTRICT.
string
Type of tax: SALES, USE, VAT, or GST.

IP Resolution Response Fields

string
"address" or "ip" — indicates which input was used for tax determination.
string
Precision of the resolved location: STREET, POSTAL_PLUS, POSTAL, PROVINCE, COUNTRY, or APPROXIMATED.
object
The address actually used for tax calculation, populated even when using IP-based resolution.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Version
enum<string>
required

API version. Must be 2026-01-01 for platform calculations.

Available options:
2026-01-01

Body

application/json

Request body for platform/marketplace tax calculations

customer
object
required
merchant
object
required

The merchant (seller) involved in this platform transaction

order_details
object
required
roles
enum<string>[]
required

Your role(s) in this transaction

Available options:
marketplace_provider,
payment_processor,
merchant_of_record
Example:
fee_details
object

Optional: Details for platform fees to be taxed separately

Response

Platform calculation response

id
string
Example:

"calc_platform_123456789"

object
string
Example:

"tax.calculation"

testmode
boolean
customer_currency_code
string
line_items
object[]
fee_line_items
object[]

Tax calculations for platform fees (only present when fee_details provided)

totals
object
merchant
object
roles
string[]
expires_at
number