1

I am trying to add customer payment(Receive Payment qbxml) only with payment amount, date and payment method with QBXML but I'm getting the following error from web connector

QuickBooks found an error when parsing the provided XML text stream

My QBXML

<?xml version="1.0" encoding="utf-8"?><?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
    <CustomerRef>
        <ListID>8000254C-1444671234</ListID>
    </CustomerRef>
    <TxnDate>2021-05-21</TxnDate>
    <RefNumber>2</RefNumber>
    <TotalAmount>100</TotalAmount>
    <PaymentMethodRef><FullName>Cash</FullName></PaymentMethodRef>
</ReceivePaymentAdd></ReceivePaymentAddRq></QBXMLMsgsRq></QBXML>

I have not added here because i want to save only payment against customer regardless of invoice no is it compulsory to add ?? Can we save only payments against customer into quickbooks using receivepayment qbxml?

2 Answers2

1

The xml is not valid. Take a closer at this line:

<PaymentMethodRef><FullName>Cash<FullName/></PaymentMethodRef>

There is an opening tag <FullName> but is not closing. In stead there is an empty element <FullName/> If that would be corrected to </FullName> the xml becomes valid.

Siebe Jongebloed
  • 3,906
  • 2
  • 14
  • 19
0

Thank you guys for your help but I got the solution to my problem. I read that in my case, "The IsAutoApply flag is used instead of AppliedToTxnAdd. This flag allows QuickBooks to receive the payment without applying it to a specific transaction If IsAutoApply is false, QuickBooks receives the payment but does not apply it to any outstanding transaction. QuickBooks creates a credit that will appear on the customer job’s next transaction." So I used false in the qbxml as follows:

<?xml version="1.0" encoding="utf-8"?><?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
    <CustomerRef>
        <ListID>8000254C-1444671234</ListID>
    </CustomerRef>
    <TxnDate>2021-05-21</TxnDate>
    <RefNumber>2</RefNumber>
    <TotalAmount>100</TotalAmount>
    <PaymentMethodRef><FullName>Cash</FullName></PaymentMethodRef>
**<IsAutoApply>false</IsAutoApply>**
</ReceivePaymentAdd></ReceivePaymentAddRq></QBXMLMsgsRq></QBXML>

https://developer.intuit.com/app/developer/qbdesktop/docs/develop/tutorials/requests-for-receive-payments-bill-payments-and-deposits this is the reference link.