v1

latestOpenAPI 3.0.02026-07-2436163302.7 KB
Tax

Request a calculation

In the one example, you can see a tax determination for a service provided directly to a consumer not through a marketplace. The other example shows a tax determination for a transaction that takes place between a third party seller and a consumer through a marketplace.

Note that these examples are just indicative. Fonoa's tax engine covers a vast larger set of use cases. If you want to learn more about Fonoa's tax engine, its functionalities, or see it in action, please get in touch here - https://www.fonoa.com/contact-sales.

post/tax/v2/calculations

Request body

Example request

{
  "supplier": {
    "country": "ca",
    "tax_region": "bc",
    "reference_id": "supplier123"
  },
  "customer": {
    "country": "it"
  },
  "transaction": {
    "id": "order7898",
    "date": "2022-06-15T13:40:31+10:00",
    "description": "a transaction for a digital service",
    "items": [
      {
        "id": "1",
        "unit_price": 100,
        "tax_category_code": "fs_0302003000",
        "description": "a digital service"
      }
    ]
  }
}

Response

OK

total_grossnumber required

The gross amount of the entire transaction (and all its items) excluding any withholding taxes.

total_gross = items.gross_amount (1) + items.gross_amount (2) + ...

total_netnumber required

The net amount of the entire transaction (and all its items).

total_net = items.net_amount (1) + items.net_amount (2) + …

total_indirect_tax_amountnumber required

The aggregation of all indirect tax amounts of the entire transaction (and all its items). It excludes any withholding taxes.

total.indirect_tax_amount = items.indirect_tax_amount(1) + items.indirect_tax_amount(2) + …

Example response

{
  "items": [
    {
      "tax_breakdown": [
        {
          "type": "indirect",
          "name": "IVA",
          "amount": 20,
          "rate": 0.25,
          "remit": 20,
          "country": "ca",
          "tax_region": "on",
          "taxable_amount": 80
        }
      ]
    }
  ]
}