Happy Business Starts Here

Error "Amount of the InvoicePayment Cannot be Omitted" when create Payment via SOAP create call

Highlighted
Zuora Alumni

Error "Amount of the InvoicePayment Cannot be Omitted" when create Payment via SOAP create call

Question: We might get an error "Amount of the InvoicePayment Cannot be Omitted" when making payment to zuora via create call. In what scenario this error may occur?



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 REPLY 1
Zuora Alumni

Re: Error "Amount of the InvoicePayment Cannot be Omitted" when create Payment via SOAP cr

Answer: One possible reason is the amount field of InvoicePayment object does not have a value.

 

Here is a sample create call which can generate the error:

 

<ns1:create xmlns:ns1="http://api.zuora.com/">
<ns1:zObjects xsi:type="ns2:Payment">
<ns2:AccountId>2c92c0f94fb13b11014fb62fc96e0fe7</ns2:AccountId>
<ns2:Amount>200</ns2:Amount>
<ns2:EffectiveDate>2017-09-25</ns2:EffectiveDate>
<ns2:AppliedCreditBalanceAmount>0</ns2:AppliedCreditBalanceAmount>
<ns2:InvoicePaymentData>
<ns1:InvoicePayment xsi:type="ns2:InvoicePayment">
<ns2:Amount></ns2:Amount>
<ns2:InvoiceId>2c92c0954fd7d8eb014fd8aed4b97eb1</ns2:InvoiceId>
<ns2:RefundAmount>0</ns2:RefundAmount>
</ns1:InvoicePayment> 
<ns1:InvoicePayment xsi:type="ns2:InvoicePayment">
<ns2:Amount>100.0</ns2:Amount>
<ns2:InvoiceId>2c92c0954fd7d8eb014fd8aed4aa7eaf</ns2:InvoiceId>
<ns2:RefundAmount>0</ns2:RefundAmount>
</ns1:InvoicePayment>
</ns2:InvoicePaymentData>
<ns2:PaymentMethodId>2c92c0f94fd7f22d014fdec5721d16b8</ns2:PaymentMethodId>
<ns2:Status>Processed</ns2:Status>
<ns2:Type>External</ns2:Type>
</ns1:zObjects>
</ns1:create>

 

and the response:

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:createResponse xmlns:ns1="http://api.zuora.com/">
<ns1:result>
<ns1:Errors>
<ns1:Code>MISSING_REQUIRED_VALUE</ns1:Code>
<ns1:Message>Amount of the InvoicePayment cannot be omitted.</ns1:Message>
</ns1:Errors>
<ns1:Success>false</ns1:Success>
</ns1:result>
</ns1:createResponse>
</soapenv:Body>
</soapenv:Envelope>

 

According to below article, the amount is the required field of InvoicePayment object:

 

https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/E1_SOAP_API_Object_Reference/InvoicePayme...

 

 

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √