What is the best way to implement withdrawal in online service?
As far as I know, there is no third-party ID could be associated with a bitcoin transaction. This means, if the power goes down, you would not be able to determine if the transaction "made it" by looking at block chain for the sender and recipient wallets.

But wallets and transactions are cheap. So you can create a pool of wallets and then intelligently rotate them making sure you lock on one until the entire transaction is complete and confirmed with public records. Then based on exclusivity of access you can determine BTC transaction hash for your system transaction record.

To take this idea to the extreme, you could create a new wallet for every amount you want to send, and use this wallet to identify the only one outgoing transaction.

Hope this would help,
Alex