Happy Business Starts Here

Highlighted
Zuora Staff

How can I transfer the negative balance to credit balance with REST API ?

Hi,

 

I would like to transfer a negative invoice amount to a credit balance.

 

To achieve my goal, try to send a POST request to https://rest.apisandbox.zuora.com/v1/object/invoice-adjustment but it fails with "Error - invalid object type: InvoiceAdjustment".

 

Is it the right API method to call? Is this endpoint available in the sandbox environment?



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

3 REPLIES 3
Zuora Staff

Re: How can I transfer the negative balance to credit balance with REST API ?

The solution is to use the Credit-Balance-Adjustments REST API:

https://www.zuora.com/developer/api-reference/#tag/Credit-Balance-Adjustments

 

The documentation does not yet mention that you can also transfer an amount from an invoice to the account balance.

 

Sample test code to transfer $60.0 from the (negative) invoice INV00000420 to the account balance:

 

POST https://rest.apisandbox.zuora.com/v1/object/credit-balance-adjustment

 

with the request:

{
"Amount": 60.0,
"Comment" : "transfer ($60.0) to the account balance",
"SourceTransactionNumber": "INV00000420",
"Type": "Increase"
}



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

Valued Scholar

Re: How can I transfer the negative balance to credit balance with REST API ?

thanks, this is working great.

 

if preparing those corrections via excel you may use an additional excel-column with =ABS(actual-negative-invoice-balance-column) to have the required positive amount to transfer.

 

btw, still not documented.

Zuora Documentation

Re: How can I transfer the negative balance to credit balance with REST API ?

The endpoint POST /v1/object/credit-balance-adjustment is now documented. See here for more details: https://www.zuora.com/developer/api-reference/#operation/Object_POSTCreditBalanceAdjustment