Handling Overpayments
From API Documentation
At times, customers will overpay the amount due on their invoices. With Zuora's Credit Balance, you can track readily track overpayments, and store credit on a customers account, which can then be later used to pay for future charges or refunded back to the customer. Zuora tracks of all payments, invoices, and refunds.
There are two primary use cases for overpayments:
- A customer makes a payment against an invoice (or invoices), and over pays as well
- A customer makes a payment for future charges, but no funds are applied to invoices at the time of payment
Handling Overpayment of an Invoice
To accept an overpayment of an invoice, the following actions take place in Zuora:
- Process Payment
- Apply Payment against Invoice
- Store the remaining funds on the Account's Credit Balance
This can be accomplished in a single API call. To do this:
- Create a Payment
- Specify Id of the Invoice to which payment will be applied
- Specify the amount of the payment that is to be applied to the invoice
- Specify the amount of the payment that is to be applied to the customer's credit balance
- Specify other required payment fields, such as the Id of the PaymentMethod, payment type (electronic vs. external), and process date
Sample SOAP call:
<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:Payment"> <ns2:AccountId>4028e485225d1d5f0122662fd6b249c8</ns2:AccountId> <ns2:InvoiceId>4028e485225d1d5f012266s2fd6bf49f8</ns2:AccountId> <ns2:AppliedInvoiceAmount>100</ns2:AppliedInvoiceAmount> <ns2:AppliedCreditBalanceAmount>50</ns2:AppliedCreditBalanceAmount> <ns2:EffectiveDate>2009-11-09T08:00:00</ns2:EffectiveDate> <ns2:PaymentMethodId>9f9fde6aa678102bb59000188b619ff8</ns2:PaymentMethodId> <ns2:Status>Processed</ns2:Status> <ns2:Type>Electronic</ns2:Type> </ns1:zObjects> </ns1:create>
Handling Payments Not Applied To Any Invoices (Payment For Future Charges)
To accept an overpayment, the following actions take place in Zuora:
- Process Payment
- Store entire amount on the Account's Credit Balance
This can be accomplished in a single API call. To do this:
- Create a Payment
- Specify the amount of the payment that is to be applied to the customer's credit balance
- Specify other required payment fields, such as the Id of the PaymentMethod, payment type (electronic vs. external), and process date
Sample SOAP call:
<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:Payment"> <ns2:AccountId>4028e485225d1d5f0122662fd6b249c8</ns2:AccountId> <ns2:AppliedCreditBalanceAmount>50</ns2:AppliedCreditBalanceAmount> <ns2:EffectiveDate>2009-11-09T08:00:00</ns2:EffectiveDate> <ns2:PaymentMethodId>9f9fde6aa678102bb59000188b619ff8</ns2:PaymentMethodId> <ns2:Status>Processed</ns2:Status> <ns2:Type>Electronic</ns2:Type> </ns1:zObjects> </ns1:create>
