I'm considering making a service that would be handling user deposits in Bitcoins through a server running bitcoind. Upon purchasing something through the service, I want to withdraw the precise amount of Bitcoins out of the account associated with the user along with a commission proportional to the amount of coins spent. As Bitcoin charges a fee for each Transaction depending on its size, it can vary between Transactions. I don't think there is a way of predicting how much will be charged exactly before the Transaction is executed, so it makes it hard for me to tell the user exactly how much they will be charged, or lower the commission to take into account the fee.
How should I go about doing precise accounting with bitcoind?