TBroMEM Posted 7 hours ago Share Posted 7 hours ago In the application, you can open a paid invoice and issue a Refund and set the Refund Type as 'Add to Client's Credit Balance'. What is the correct API request for this? Would the following work (sample is using localAPI from a hook? I don't see a description available when issuing from invoice refund, so not sure it applies. Also, is amountout correct? //Add create credit from refund transaction $command = 'AddTransaction'; $values = array( 'invoiceid' => $invoiceid, // this would be passed in as declared var 'transid' => 'Test', 'userid' => $clientid, // this would be passed in as declared var 'description' => 'Credit added to client...', // not sure this would be used without testing 'amountout' => $creditamt, // not sure if amountin or amountout is used. This would be passed in as delcared var 'fees' => '0.00', 'credit' => '1', ); $addInvoiceCredit = localAPI($command, $values, $adminuser); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.