Skip to main content
POST
/
api
/
tax
/
calculate
Calculate GST/VAT
curl --request POST \
  --url https://api.ai2fin.com/api/tax/calculate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 123,
  "gstIncluded": true,
  "gstRate": 123,
  "countryCode": "<string>",
  "taxType": "<string>"
}'
{
  "success": true,
  "data": {
    "amount": 123,
    "baseAmount": 123,
    "gstAmount": 123,
    "gstIncluded": true,
    "gstRate": 123,
    "input": {
      "amount": 123,
      "gstIncluded": true,
      "gstRate": 123,
      "countryCode": "<string>",
      "taxType": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

JWT token obtained from /api/auth/login endpoint

Body

application/json
amount
number
required
gstIncluded
boolean
required
gstRate
number

Optional rate override

countryCode
string

Fallback to lookup rate when provided

taxType
string

Tax type (GST, VAT, SALES_TAX, etc.)

Response

200 - application/json

Calculation complete

success
boolean
data
object