Search code examples
quickbooksintuit-partner-platform

Quickbooks IPP v3 Invalid Line TaxCode in the request


Using the IPP v3 I am trying to submit an invoice with multiple lines with different taxcode(s), I am getting the following error when submitting an invoice with 2 lines with TaxCodeRef mapping to existing TaxCode(s).

<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-06-11T00:32:48.687-07:00">
  <Fault type="ValidationFault">
    <Error code="6100" element="Line.SalesItemLineDetail.TaxCodeRef">
      <Message>Invalid Line TaxCode in the request</Message>
      <Detail>Valid line TaxCodes for US should be TAX or NON. Supplied value: 8</Detail>
    </Error>
    <Error code="6100" element="Line.SalesItemLineDetail.TaxCodeRef">
      <Message>Invalid Line TaxCode in the request</Message>
      <Detail>Valid line TaxCodes for US should be TAX or NON. Supplied value: 9</Detail>
    </Error>
  </Fault>
</IntuitResponse>

Here is the submitted XML, TaxCode with Id 8 and 9 are defined and active.

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Invoice xmlns:ns0="http://schema.intuit.com/finance/v3">
  <ns0:TxnDate>2015-06-11</ns0:TxnDate>
  <ns0:Line>
    <ns0:LineNum>1</ns0:LineNum>
    <ns0:Description>Product1</ns0:Description>
    <ns0:Amount>54.95</ns0:Amount>
    <ns0:DetailType>SalesItemLineDetail</ns0:DetailType>
    <ns0:SalesItemLineDetail>
      <ns0:ItemRef>20</ns0:ItemRef>
      <ns0:UnitPrice>54.95</ns0:UnitPrice>
      <ns0:Qty>1</ns0:Qty>
      <ns0:TaxCodeRef>8</ns0:TaxCodeRef>
    </ns0:SalesItemLineDetail>
  </ns0:Line>
  <ns0:Line>
    <ns0:LineNum>1</ns0:LineNum>
    <ns0:Description>Product2</ns0:Description>
    <ns0:Amount>54.95</ns0:Amount>
    <ns0:DetailType>SalesItemLineDetail</ns0:DetailType>
    <ns0:SalesItemLineDetail>
      <ns0:ItemRef>20</ns0:ItemRef>
      <ns0:UnitPrice>54.95</ns0:UnitPrice>
      <ns0:Qty>1</ns0:Qty>
      <ns0:TaxCodeRef>9</ns0:TaxCodeRef>
    </ns0:SalesItemLineDetail>
  </ns0:Line>
  <ns0:CustomerRef>58</ns0:CustomerRef>
</ns0:Invoice>

Is it possible to submit one invoice with multiple lines having different TaxCodes for Quickbooks online ?


Solution

  • I think you're asking the wrong question. You're asking:

    Is it possible to submit one invoice with multiple lines having different TaxCodes for Quickbooks online ?

    But the error is telling you:

    Valid line TaxCodes for US should be TAX or NON. Supplied value: 9

    So the problem isn't that you're submitting different tax codes. The problem is that you're submitting an invalid tax code.

    You submitted:

    <ns0:TaxCodeRef>9</ns0:TaxCodeRef>

    When the only valid submissions are:

    TAX or NON

    e.g.

    <ns0:TaxCodeRef>TAX</ns0:TaxCodeRef>

    or

    <ns0:TaxCodeRef>NON</ns0:TaxCodeRef>

    There are no other valid values for QuickBooks Online in the USA. Only TAX and NON.

    For QuickBooks Online outside of the USA this behavior differs a little in that other countries support a different set of tax does (e.g. GST, HST, PST, etc.)