Jump to content

how to get credit balance


ST4R
Go to solution Solved by SeanP,

Recommended Posts

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?

Link to comment
Share on other sites

  • Solution

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 by SeanP
Link to comment
Share on other sites

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 :

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated