A Reseller only serviceThis command can be used to transfer credits between accounts created under a dual brand or white label provider account.
https://api.txtlocal.com/transfer_credits/
<?php // Account details $apiKey = urlencode('Your apiKey'); $user_id = '123456'; $credits = '123456'; // Prepare data for POST request $data = array('apikey' => $apiKey, 'user_id' => $user_id, 'credits' => $credits); // Send the POST request with cURL $ch = curl_init('https://api.txtlocal.com/transfer_credits/'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response; ?>
<?php // Account details $apiKey = urlencode('Your apiKey'); $user_id = "123456"; $credits = "123456"; // Prepare data for POST request $data = 'apikey=' . $apiKey . '&user_id=' . $user_id . '&credits=' . $credits // Send the GET request with cURL $ch = curl_init('https://api.txtlocal.com/transfer_credits/?' . $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response; ?>
user_id | ID of the user you wish to transfer credits to. Found in get_users |
---|---|
user_email | Can be used instead of user_id as the account you wish to transfer credits to. |
credits | The amount of credits you would like to transfer to this user. |
Login Parameters (Additional Information) | |
apiKey | You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. |
{ "Transfer Complete":{ "user":"test@gmail.com", "credits":"250" }, "status":"success" }
<response> <transfer_complete> <user>Test@gmail.com</user> <credits>10</credits> </transfer_complete> <status>success</status> </response>
Error Codes | |
64 | No email address specified. |
---|---|
65 | No credits amount specified. |
66 | Not enough credits to transfer. |
67 | Invalid email address. |
68 | Invalid credit amount specified. |
69 | Invalid user ID specified. |
70 | No ID or email specified. |
72 | No reseller account found. |