1) Well, bitcoin already has an API for transactions, and a test system (testnet) to verify that your software works without losing money.
It would be nice if mtgox/mybitcoin had a merchant API on testnet, to verify that works without dealing with real money.
2) Transactions are not timestamped, but blocks are. IOW, the transaction is timestamped when it is verified by the network, wrapped inside a block. You may combine that with historical exchange prices.
My CPA advises me to note the BTC/USD exchange rate at the time of a BTC-only transaction, as well as noting all BTC/USD conversions of course.