Have you tried
WHMCS or
ModernBill? They both have powerful
APIs to integrate with various shopping carts & do have control panel integrations as well.
We at Eukhost used Modernbill in the past, it's a wonderful piece of software, but later on had to switch over to WHMCS, which is another great & AFAIK the best billing software
Further more if you want to go ahead & build your custom scripts using the CPanel API, which they do give out, you can refer these links for more info:
http://www.cpanel.net/developer/interfacing.html
http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi