A valid TransactionType and/or ServiceType are required

Error Description

The Transaction Type field (tran), the Service Type field (serv), or both are missing in LineItem (itms).

Example

{
  "err": [
    {
      "code": -2000,
      "msg": "A valid TransactionType and/or ServiceType are required."
    }
  ]
}

How to Resolve

Add and populate the Transaction Type (tran) and Service Type (serv) fields in LineItem (cmpn) in your CalcTaxes request.

Use the /api/v2/afc/tspairs endpoint to get a list of valid Transaction/Service pairs.

If you are using the Interstate/Intrastate Determination functionality, ensure that supported a Transaction Type (tran) or Service Type (serv) is used and that the Transaction Type (tran) and Service Type (serv) are not both set to “-1”.

For more information, see Interstate/Intrastate Determination.