Cart Tax Calculation
Calculate the tax due on a cart of items for one of your connected merchants. Use this before you record an order so you can display an accurate tax total at checkout. The calculation reflects the merchant’s own compliance configuration (registrations, product rules, and exemptions).
This is the merchant-scoped cart calculation at /merchant/cart/calculate.
It is different from the general-purpose /calculate/cart rate-lookup endpoint,
which is not tied to a merchant.
Endpoint
Request body
Cart object
Address object
Line item object
Discounts object
For percentage discounts, value is a decimal fraction between 0 and 1
(0.1 = 10% off); for amount discounts it is a fixed currency amount. When
you provide discounts, line-item prices must be pre-discount originals — if
your prices are already discounted, omit the discounts field.
Example
Response
Returns the calculated carts with tax computed per line item.
If you do not receive a response, it is safe to call cart/calculate again,
calculation has no lasting side effect. Do not, however, retry
order or refund writes blindly. See
Retries and idempotency.