You may find the Ledger[0] accounting program useful. It's a CLI parser for a specially-formatted text file, and should be pretty easy for you to integrate with your existing infrastructure.
I don't know what sort of API Quickbooks offers, but I'd be surprised if it's easier to rig up than appending to a text file and running a couple commands.
At some point I'll do the sane thing and just use Quickbooks like everyone... but I always put it off.