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.
Important: Amount is Per-Unit In platform calculations, the amount field represents the per-unit price . The taxable base is calculated as: taxable_base = amount × quantity
This is different from the standard /calculations endpoint where amount is the total line item value.
Bearer token authentication.
Must be 2026-03-01 for platform calculations.
Request Body
The customer (buyer) information. Either CONSUMER or BUSINESS.
Array of customer tax IDs (for B2B transactions).
Customer’s address including address_type (shipping or billing). At least one of address or ip must be provided.
Customer IP address for geo-based tax resolution. At least one of address or ip must be provided. A valid IPv4 or IPv6 address.
Resolution strategy: strict, zero, approximate, or best_effort. Numeral strongly recommends strict mode to stay as compliant as possible.
The merchant (seller) involved in this transaction. The merchant ID (merch_xxx) or your reference_merchant_id.
Either BUSINESS or INDIVIDUAL.
Override merchant’s stored tax IDs for this calculation.
Order details including line items. Show Order Details Properties
ISO 4217 currency code (e.g., USD, EUR).
Whether the amount includes tax.
Array of line items. Remember: amount is per-unit!
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
Optional: Details for platform fees to be taxed separately. Same structure as order_details.
Line Item Properties
Per-unit price in the smallest currency unit (e.g., cents for USD).For a $25.00 item: amount: 2500
Number of units. The taxable base = amount × quantity.
Tax category code (e.g., GENERAL_MERCHANDISE, SAAS_GENERAL).
Reference to a pre-created product.
Your ID for this line item.
Response
Tax calculations for order line items.
Tax calculations for fee line items (only present when fee_details provided).
Summary totals for order and fees. Order totals: tax_amount, amount_excluding_tax, amount_including_tax.
Fee totals (only present when fee_details provided).
The merchant used in this calculation.
Enhanced Response Fields
Platform calculations include additional tax jurisdiction details:
Name of the tax authority (e.g., “California State”).
Type of authority: STATE, COUNTY, CITY, or DISTRICT.
Type of tax: SALES, USE, VAT, or GST.
IP Resolution Response Fields
"address" or "ip" — indicates which input was used for tax determination.
Precision of the resolved location: STREET, POSTAL_PLUS, POSTAL, PROVINCE, COUNTRY, or APPROXIMATED.
The address actually used for tax calculation, populated even when using IP-based resolution.
Basic Marketplace
IP-Based Resolution
With Platform Fees
curl -X POST https://api.numeralhq.com/tax/platform/calculations \
-H "Authorization: Bearer sk_test_xxx" \
-H "X-API-Version: 2026-03-01" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"address": {
"address_line_1": "100 Market St",
"address_city": "San Francisco",
"address_province": "CA",
"address_postal_code": "94105",
"address_country": "US"
}
},
"merchant": {
"merchant_id": "my-seller-123"
},
"order_details": {
"customer_currency_code": "USD",
"tax_included_in_amount": false,
"automatic_tax": "auto",
"line_items": [
{
"amount": 2500,
"quantity": 3,
"product_category": "GENERAL_MERCHANDISE"
}
]
},
"roles": ["marketplace_provider"]
}'
200 - Basic Response
200 - With Fees
404 - Merchant Not Found
{
"id" : "calc_platform_123456789" ,
"object" : "tax.calculation" ,
"testmode" : true ,
"customer_currency_code" : "USD" ,
"line_items" : [
{
"product" : {
"product_tax_code" : "GENERAL_MERCHANDISE"
},
"tax_jurisdictions" : [
{
"tax_rate" : 0.0875 ,
"rate_type" : "SALES TAX" ,
"jurisdiction_name" : "California" ,
"tax_authority_name" : "California State" ,
"tax_authority_type" : "STATE" ,
"tax_type" : "SALES" ,
"fee_amount" : 0
}
],
"quantity" : 3 ,
"tax_amount" : 656 ,
"amount_excluding_tax" : 7500 ,
"amount_including_tax" : 8156
}
],
"totals" : {
"order" : {
"tax_amount" : 656 ,
"amount_excluding_tax" : 7500 ,
"amount_including_tax" : 8156
}
},
"merchant" : {
"id" : "merch_abc123" ,
"reference_merchant_id" : "my-seller-123"
},
"roles" : [ "marketplace_provider" ],
"expires_at" : 1735690200
}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
API version. Must be 2026-01-01 for platform calculations.
Available options:
2026-01-01
Request body for platform/marketplace tax calculations
The merchant (seller) involved in this platform transaction
Your role(s) in this transaction
Available options:
marketplace_provider,
payment_processor,
merchant_of_record
Optional: Details for platform fees to be taxed separately
Platform calculation response
Example: "calc_platform_123456789"
Tax calculations for platform fees (only present when fee_details provided)