Skip to main content
1

Get your API key

Obtain a Yonda API key during onboarding and store it in your server environment as YONDA_API_KEY. Confirm the calculation coverage for your installation with Yonda. See authentication for details.
2

Calculate tax

Send a sale with a billing or shipping address. This example has one line worth USD 10.00 before tax and a USD 2.00 delivery charge. Money is represented in integer minor units: 1000 and 200 respectively.
3

Read the result

An HTTP 200 response includes product and shipping tax details. The response currency is lowercase.
The rates shown are illustrative for this address, and your results depend on your coverage.

Request rules

  • Use integer minor units for money: USD 1000 means $10.00; JPY 1000 means ¥1,000. Quantities are JSON numbers and may be fractional.
  • Set each line’s amount to its subtotal after discount: quantity × unit_price − discount_amount. The API uses the supplied amount; it does not subtract the discount again.
  • Send product amounts and shipping costs before tax.
  • Include between 1 and 1,250 lines with unique positive number values.
  • Supply the address selected by customer.address_source. Use billing or shipping; the corresponding address must be present. Provide sufficient address detail for your tax jurisdiction.
  • Use snake_case field names and JSON numeric values, not strings. Unknown fields are rejected.
Continue with the calculation guide for discounts and shipping. For rejected requests, see errors.