Skip to main content

Create a Credit Balance Adjustment

Zuora

Create a Credit Balance Adjustment

Overview

Using Credit Balance Adjustments you can increase or decrease a customer's credit balance.

Credit Balance Use Cases

With Credit Balance Adjustments, you can handle many use cases, including:

  • Increasing Credit Balance
    • Accept and track an overpayment from a customer
    • Apply credit from a negative balance invoice
  • Decreasing Credit Balance
    • Apply credit to an existing invoice (pay for an invoice with funds from the customer's credit balance)
    • Cancel a previous positive (increasing) adjustment
    • Refund money to a customer from their credit balance

Enable Credit Balance Adjustments

Create a Credit Balance Adjustment

To create a Credit Balance Adjustment

  1. Use the create() call for a CreditBalanceAdjustment object.
  2. Specify the SourceTransactionId or SourceTransactionNumber. Typically, this is the Invoice.Id or Invoice.Number that you want to transfer to or from.

SOAP Examples

The following are example SOAP calls for creating CreditBalanceAdjustments.

Adjust a Negative Invoice and Transfer the Balance to a Customer's Credit Balance by Specifying SourceTransactionId
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
    <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
      <ns1:session>B4EpRix4...</ns1:session>
    </ns1:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <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:CreditBalanceAdjustment">
        <ns2:Type>Increase</ns2:Type>
        <ns2:Amount>12</ns2:Amount>
        <ns2:Comment>transfer negative invoice to Credit Balance</ns2:Comment>
        <ns2:ReferenceId>reference id</ns2:ReferenceId>
        <ns2:AccountingCode>ac1</ns2:AccountingCode>
        <ns2:SourceTransactionId>402892q028903c510128903e26a800e3</ns2:SourceTransactionId>
      </ns1:zObjects>
    </ns1:create>
  </soapenv:Body>
</soapenv:Envelope>
Adjust a Negative Invoice and Transfer the Balance to a Customer's Credit Balance by Specifying SourceTransactionNumber
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Header>
   <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
     <ns1:session>B4EpRix4...</ns1:session>
   </ns1:SessionHeader>
 </soapenv:Header>
 <soapenv:Body>
   <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:CreditBalanceAdjustment">
         <ns2:Type>Increase</ns2:Type>
         <ns2:Amount>12</ns2:Amount>
         <ns2:Comment>transfer negative invoice to Credit Balance</ns2:Comment>
         <ns2:ReferenceId>reference id</ns2:ReferenceId>
         <ns2:AccountingCode>ac1</ns2:AccountingCode>
         <ns2:SourceTransactionNumber>INV00005434</ns2:SourceTransactionNumber>  
      </ns1:zObjects>
   </ns1:create>
 </soapenv:Body>
</soapenv:Envelope>
Apply Funds from the Credit Balance Towards an Outstanding Invoice
<?xml version='1.0' encoding='UTF-8'?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
   <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
     <ns1:session>B4EpRix4...</ns1:session>
   </ns1:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
   <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:CreditBalanceAdjustment">
       <ns2:Amount>40</ns2:Amount>
       <ns2:Comment>Apply $40 from the Credit Balance to Invoice INV00005434</ns2:Comment>
       <ns2:AccountingCode>ac1</ns2:AccountingCode>
       <ns2:SourceTransactionNumber>INV00005434</ns2:SourceTransactionNumber>
       <ns2:Type>Decrease</ns2:Type>
   </ns1:zObjects>
  </ns1:create>
 </soapenv:Body>
 </soapenv:Envelope>
Create a Credit Balance and Specifying Both SourceTransactionNumber and SourceTransactionId

If you specify both SourceTransactionNumber and SourceTransactionId, they must correspond to the same invoice.

<?xml version='1.0' encoding='UTF-8'?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
   <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
     <ns1:session>B4EpRix4...</ns1:session>
   </ns1:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
   <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:CreditBalanceAdjustment">
       <ns2:Type>Increase</ns2:Type>
       <ns2:Amount>12</ns2:Amount>
       <ns2:Comment>transfer negative invoice to Credit Balance</ns2:Comment>
       <ns2:ReferenceId>reference id</ns2:ReferenceId>
       <ns2:AccountingCode>ac1</ns2:AccountingCode>
       <ns2:SourceTransactionNumber>INV00005434</ns2:SourceTransactionNumber>
       <ns2:SourceTransactionId>402892q028903c510128903e26a800e3</ns2:SourceTransactionId>  
   </ns1:zObjects>
  </ns1:create>
 </soapenv:Body>
 </soapenv:Envelope>