ST4R Posted February 23 Share Posted February 23 hi there I want to get Credit Balance value shown on Client Profile (Admin Area) for an specific user id. I checked the api refrences and I got nothing! Also I tried to get it from database and again I got nothing! Someone please help me how can I get the last Credit Balance value for an user id? 0 Quote Link to comment Share on other sites More sharing options...
Solution SeanP Posted February 24 Solution Share Posted February 24 (edited) You can use the API to get the available credit balance for a client. // Set Client ID $clientid = '{YOUR_CLIENT_ID}'; // Get Client Credit Balance $command = 'GetClientsDetails'; $postData = array( 'clientid' => $clientid, 'stats' => true, ); $creditresults = localAPI($command, $postData); // Set Credit Balance Variable $clientcredit = $creditresults['client']['credit']; // Set Credit Balance Variable With Currency $clientcreditcurrency = $creditresults['stats']['creditbalance']; Edited February 24 by SeanP 0 Quote Link to comment Share on other sites More sharing options...
ST4R Posted February 24 Author Share Posted February 24 6 hours ago, SeanP said: You can use the API to get the available credit balance for a client. // Set Client ID $clientid = '{YOUR_CLIENT_ID}'; // Get Client Credit Balance $command = 'GetClientsDetails'; $postData = array( 'clientid' => $clientid, 'stats' => true, ); $creditresults = localAPI($command, $postData); // Set Credit Balance Variable $clientcredit = $creditresults['client']['credit']; // Set Credit Balance Variable With Currency $clientcreditcurrency = $creditresults['stats']['creditbalance']; Thank you It did solve my problem. Please consider my other topic : 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.