This article covers
ERROR MESSAGE: Invalid Reference Id,
ERROR DETAIL: Invalid Reference Id: Categories cannot be used in transactions., MORE ERROR DETAIL:]
This error occurs if you have any line item of invoice named as CATEGORY in Quickbooks.
Note: You may come across this error only in the invoices which have the discount line item because the Quickbooks Discount item is of type "CATEGORY".
Contact Quickbooks support to change this type to "SERVICE". To resolve this error.