Do a search on these forums for 'billing system' its a topic thats been much talked about but it seems everyones needs and therefore recommended software are different. I personally use WHMCS and it does most of what I need to automate billing and track renewals.
WHMCS - The Complete Client Management, Billing & Support System