x Cheetah tool Support
Please Login To website and send the ticket OR You can send your message by Contact us




Reseller API

License resellers can easily link their websites to Cheetah-Tool.com through the reseller API interface.

You can connect to our servers through the API and use things like activating Licenses and transfer credit ...

Our PHP class communicates over the HTTPS protocol and uses the GET method to retreive data in the JSON format.




How to Connect the Cheetah To Dhru Fusion



Download API
Download Dhru fusion API



How to Connect the Cheetah To Another Systems


Error codes and messages

Authentication errors

100 Not set Request AND API token!
101 API Token is invalid
102 Not Found request
200 The request has been successfully executed

Activate License errors

600 Active Success
601 You don't have licenses for this plan
602 Not Found this Plan
603 Not Found this email
604 Not send PlanID or Email
605 Your reseller account disabled

Credit Transfer errors

700 Credit successfully Added
701 Reseller credit is Finished
702 Not Found this user
703 Credit must be a number and more than 5
704 Not send credit amount or Email
705 Your reseller account disabled

API functions

All API functions return an array that has an element named success that is true or false, if its value is false Communication with api failed and you must send values correctly and another element named message There is an error message that tells you the error codes above.

Get prices & Plans

With this function you can load credit and license reseller prices

Parameters

  • $api_token - api token of reseller


Returns

  • success - This value must be true
  • code - Error Code or 200 is success
  • Message { plans
    [{"plan_id":x,"plan_name":"CHEETAH TOOL PRO activation 12 Month","price":"xx"},{"plan_id":xx,"plan_name":"CHEETAH TOOL PRO activation 6 Month","price":"xx"} ,{"plan_id":xx,"plan_name":"CHEETAH TOOL PRO activation 3 Month","price":"xx"}] ,
    "credit_price":"0.x" }



  1. <?php
  2.  
  3.  
  4. ///////// Reseller Token ////
  5. $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
  6.  
  7.  
  8. $get = "cmd=get_prices&api_token=".$api_token;
  9. $ch = curl_init();
  10. curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  12. $request = curl_exec($ch);
  13.  
  14. $response = json_decode($request, true);
  15.  
  16. if ($response['success'] === "true") {
  17. echo var_dump($response );
  18. }





Active License

With this function you can activate the user account by email. To activate the account you must have License in your reseller account then the server to respond , this process may have an error that is specified above the error code.

Parameters

  • $username - The username is same email
  • $plan_id - take from get prices api


Returns

  • success - This value may be false and if the value is returned true, the License is successfully Activated
  • code - Error Code
  • message - Error text


  1. <?php
  2.  
  3. ///////// Reseller Token ////
  4. $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
  5.  
  6. $plan_id = "take from get prices api (https://cheetah-tool.com/__r_api/?cmd=get_prices&api_token=xxx)";
  7. $user_email = "[email protected]";
  8.  
  9. $get = "cmd=active_license_new&api_token=".$api_token."&username=".$user_email."&plan_id=".$plan_id;
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get);
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13. $request = curl_exec($ch);
  14.  
  15. $response = json_decode($request, true);
  16.  
  17. if ($response['success'] === "true") {
  18. echo "Success Activated: ".$response['code']."<br>";
  19. echo "Message: ".$response['message'];
  20. } else {
  21. echo "Message: ".$response['message']."<br>";
  22. echo "Error: ".$response['code']."<br>";
  23. }




Transfer Credit

With this function you can transfer Credit to users

Parameters

  • $user_email - Registered Email User
  • $credit - The amount of credit


Returns

  • success - This value may be false and if the value is returned true, the Credit is successfully Transfered
  • code - Error Code
  • Message - Error text


  1. <?php
  2.  
  3.  
  4. ///////// Reseller Token ////
  5. $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
  6.  
  7.  
  8. $user_email = "[email protected]";
  9. $credit = 2;
  10.  
  11.  
  12. $get = "cmd=transfer_credit&api_token=".$api_token."&email=".$user_email."&credit=".$credit;
  13. $ch = curl_init();
  14. curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get);
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. $request = curl_exec($ch);
  17.  
  18. $response = json_decode($request, true);
  19.  
  20. if ($response['success'] === "true") {
  21. echo "Success Transfered: ".$response['code']."<br>";
  22. echo "Message: ".$response['message'];
  23. } else {
  24. echo "Message: ".$response['message']."<br>";
  25. echo "Error: ".$response['code']."<br>";
  26. }
  27.