We are using a system called DirectTrack to track statistics and then at the end of the month we bill all our advertisers by generating them an invoice in FreshBooks (a system used for invoicing).
We want to automate this process. Both Direct Track and FreshBooks have advanced APIs.
For more information on FreshBooks API visit:
[url removed, login to view]
For more information on DirectTrack API drop me a private message and I can give you a login to view the documents, samples etc.