You need to check the irreversible block:

> an action is irreversible (final) if "block_num" < "last_irreversible_block"

Check this out: https://github.com/EOSIO/eos/wiki/Tutorial-Exchange-Deposit-Withdraw#machine-readable-account-history-json

If you are inside the contract and have a reference of a transaction/action/receiving-action you can assume that these are going to be all confirmed or if for some reason they are not, your action will fails also.