Happy Business Starts Here

Community Manager

How do I use Zuora API to create a partial Refund on a Payment made for multiple Invoices?

See Reply



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

3 REPLIES 3
Community Manager

Re: How do I use Zuora API to create a partial Refund on a Payment made for multiple Invoices?

Question or Problem Statement:

I would like to ask how can I use the Zuora API to create a partial refund on a payment made for multiple invoices. The Zuora Knowledge Center indicates that the ‘Amount’ field on the ‘Refund’ object cannot handle partial refunds on multiple invoices. However, RefundInvoicePaymentData supports it and its value must be RefundInvoicePayment which is the result of a successful refund process. Does this mean that I have to create a refund first, and if yes, which field should I put the refund amount if the ‘Amount’ field cannot support partial refunds?

Solution:

We do support create a partial Refund on a Payment made for multiple Invoices via SOAP API. Please find the sample code below: 

 

<ns1:create xmlns:ns1="http://api.zuora.com/">
<ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Refund">
<ns2:AccountId>4028924549bdb5e00149bdbc19770011</ns2:AccountId>
<ns2:Amount>4</ns2:Amount>
<ns2:PaymentId>4028924549bdb5e00149bdbf164d004d</ns2:PaymentId>
<ns2:Type>Electronic</ns2:Type>
<ns2:RefundInvoicePaymentData>
<ns1:RefundInvoicePayment xsi:type="ns2:RefundInvoicePayment">
<ns2:RefundAmount>2</ns2:RefundAmount>
<ns2:InvoiceId>4028924549bdb5e00149bdbed3da0038</ns2:InvoiceId>
</ns1:RefundInvoicePayment>
<ns1:RefundInvoicePayment xsi:type="ns2:RefundInvoicePayment">
<ns2:RefundAmount>2</ns2:RefundAmount>
<ns2:InvoiceId>402881e849b885fe0149b892f90c007f</ns2:InvoiceId>
</ns1:RefundInvoicePayment>
</ns2:RefundInvoicePaymentData>
</ns1:zObjects>
</ns1:create>

 

InvoiceID is included in RefundInvoicePayment wrapper. If you would like to apply the refund to a specific Invoice, just specify the Invoice Id.

Gotchas/Pitfalls:

This feature is only supported with WSDL Version 64+.

Supporting References:

https://knowledgecenter.zuora.com/BC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Refund



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

New Student

Re: How do I use Zuora API to create a partial Refund on a Payment made for multiple Invoices?

How we can create refundInvoicePayment using SOAP API  to pass in the above call.

Highlighted
Tutor KaZ
Tutor

Re: How do I use Zuora API to create a partial Refund on a Payment made for multiple Invoices?

This answer is not helpful.  Is it possible to answer the question using a clearer step by step method?