How can we be sure that it's not a double spent transaction or something else?
That will vary depending on the merchant. If they will let you go even the transaction is not yet confirmed then you can, if not then you cannot. If they want to wait for the confirmation, you might end up adding transaction fees so that the transaction will be confirmed quickly and that is the worst. This transaction confirmation waiting time needs to be compromised as soon as possible in order for Bitcoin to be used as an effective currency.
I doubt double spent tx will occur there. Almost all wallet (if not all) displays a notification or something that confirms your tx so having a double payment is not possible otherwise the user is at fault.