Jump to content

Get data from WHMCS using external program


pat_ads

Recommended Posts

Hello all! I was hoping someone could help me map this out and maybe give me a hint or two how it can be achieved.

 

We have a software product that accesses SQL Server (not MySQL) database hosted remotely. We charge a monthly subscription for access to the database (like a SaaS product).

 

Each product (3 types) allows for either 1, 2 or 3 PC's to access the database. Also, each product has a configurable option to add PC's to the mix (i.e. 2 additional PC's at $29/mo each).

 

So in my scenario, customer purchases Pro package with 2 PC's and adds 2 additional PC's via configurable options.

 

My initial thought was to have the program, upon startup, check WHMCS using an external API (I'm not a programmer - but I do play one on T.V. - JK, I do have one on staff). This check would find the product purchased which would give the # of licenses as well as check for config options purchased to see if any additional licenses exist. It would also check (obviously) the status of the account - Active, Inactive, etc.

 

My reading leads me to believe that external API calls should come from one IP address, which is defined, but since the software could be loaded anywhere, I have no idea what the IP would be.

 

I've looked at the licensing add-on but I dont think it would work as this isnt a web based program. I've searched the forums but info using the licensing add-on in a way I propose is scant.

 

Anyone have any thoughts? Am I misunderstaning external API usage?

 

Thanks in advance!

Link to comment
Share on other sites

  • 2 weeks later...

I don't think you *need* a web-based program to use the WHMCS licencing module (I don't use it myself, however). You could simply make your program (What ever it is written in), make a API call to your WHMCS to check the licence is valid.

 

The other solution would be to write you own small API, which in turn consults the WHMCS API, and returns the data to you. Ie

PC <-> your API <-> WHMCS Api. So there would be only 1 IP connecting to your WHMCS API.

Link to comment
Share on other sites

You can setup a license in WHMCS to not check the ip address and just verify the license key. So your application would just need to make an HTTP post call to the verify.php and parse the response back to see if it is valid. You could also then store the localkey value returned so it doesn't need to call out to the server each time the user launches the application.

Link to comment
Share on other sites

Thanks for the response! So if I understand correctly, you suggest that I use the Licensing Module, correct? So, if my product allows for 3 PC's to run the software, could the Licensing Module issue 3 keys, and then I just send an email upon purchase with those 3 keys to the user to enter into the software (1 key for each PC)?

 

Also, I allow for the user to purchase additional PC licenses as a configurable option. For example, they buy the PRO version, which has 3 PC's and then do an add-on for one additional PC. Could the Licensing Module also issue a license for that additional PC, and how would I configure it to do so? Or is a configurable option not the right choice?

 

Thanks for the help!

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