WHMCS is a popular billing system specially for domain+hosting business. It provides mostly billing solutions. You can download WHMCS from download page. As a billing system, if you have several tools, utilities and services that require connection between your application and WHMCS then you badly need API to accomplish that interconnection.
WHMCS has a very basic API documentation (it’s enough though) without any specific programming library. You can use the following wrapper class to interact with your WHMCS system from your PHP application. This is very simple and doesn’t require further explanation in depth. See the following script. If you have any better idea or suggestions, don’t forget to write me in the comment area.