Unable to update QuickBooks Offline Payment

53 views Asked by At

I am sending this request to the QBSDK for updating a payment but getting an exception

"QuickBooks found an error when parsing the provided XML text stream."

.

<?xml version="1.0" ?> 
  <?qbxml version="6.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <ReceivePaymentModRq requestID="1">
 <ReceivePaymentMod>
  <TxnID>130-1503933149</TxnID> 
  <EditSequence>1503933149</EditSequence> 
 <CustomerRef>
  <ListID>80000012-1503933114</ListID> 
  </CustomerRef>
  <TxnDate>2017-08-28</TxnDate> 
 <PaymentMethodRef>
  <FullName>Cash</FullName> 
  </PaymentMethodRef>
 <AppliedToTxnMod>
  <TxnID>12D-1503933135</TxnID> 
  <PaymentAmount>200.00</PaymentAmount> 
  </AppliedToTxnMod>
  <TotalAmount>200.00</TotalAmount> 
  </ReceivePaymentMod>
  </ReceivePaymentModRq>
  </QBXMLMsgsRq>
  </QBXML>

Can anyone suggest what is wrong with this xml request ?

1

There are 1 answers

0
Mainak On

The position of the TotalAmount tag in my xml request was the issue . I solved it by putting it just below the PaymentMethodRef tag like this :

<?xml version="1.0" ?> 
  <?qbxml version="6.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <ReceivePaymentModRq requestID="1">
 <ReceivePaymentMod>
  <TxnID>130-1503933149</TxnID> 
  <EditSequence>1503933149</EditSequence> 
 <CustomerRef>
  <ListID>80000012-1503933114</ListID> 
  </CustomerRef>
  <TxnDate>2017-08-28</TxnDate> 
 <PaymentMethodRef>
  <FullName>Cash</FullName> 
  </PaymentMethodRef>
  <TotalAmount>200.00</TotalAmount>
 <AppliedToTxnMod>
  <TxnID>12D-1503933135</TxnID> 
  <PaymentAmount>200.00</PaymentAmount> 
  </AppliedToTxnMod>       
  </ReceivePaymentMod>
  </ReceivePaymentModRq>
  </QBXMLMsgsRq>
  </QBXML>