Doing a deal when one of the two parties to the transaction is not present
Question

What is the ruling on doing a deal when one of the two parties to the transaction is not present? For example, when a product sells well on the Internet, so the purchaser goes ahead and buys the product when the seller is not present.
Praise be to Allah.Firstly:
Islam affirms that each party to a transaction has the right to cancel the deal without the consent of the other party, so long as they are still in the meeting in which the transaction was concluded. But when they part, the transaction becomes binding and cannot be annulled except by mutual consent, or for a reason that makes it permissible to annul it, such as if the product is defective.
Al-Bukhari (2112) and Muslim (1531) narrated from Ibn `Umar (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him said: “When two men enter into a transaction, each one of them has the option (of cancelling) so long as they have not parted and are still together. But if one of them gives the other the choice to decide, then they agree on a deal, then it becomes binding. If they part after that and neither of them cancelled it, then the transaction becomes binding.”
If one of the two parties to the transaction is absent from that meeting, such as if the seller sends a message to the purchaser saying: I sell you my car for such and such an amount, and the message reaches the purchaser and he accepts, then the transaction is valid, and the purchaser has the option to cancel the deal so long as he remains in the place where the message reached him and he accepted the deal.
It says in al-Mawsu`ah al-Fiqhiyyah (30/217-218):
It is also valid to draw up a deal between two people who are present with the offer and acceptance in the usual wording, and it is also valid between two who are not present, in writing or by sending a messenger and the like. So if one person writes to the other, for example: I sell you my house for such and such an amount, and the letter reaches him and he accepts, then the deal is done.
What appears to be the case, based on the texts of the jurists, is that the equivalent of “the meeting in which the transaction is done” when the two parties to the transaction are not present is the occasion on which the one to whom the letter was addressed or to whom the messenger was sent accepts the deal [and does not cancel it before moving on to some other matter]. End quote.
Based on that, in the case of purchasing via the Internet, the option to cancel is available to the purchaser so long as he has not moved on to another matter after accepting the deal.
Some of the scholars favoured the view that if the deal is concluded in such a manner, and the seller and purchaser did not meet in reality, then there is no option to cancel in that case.
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said: In the Prophet’s words “When two men enter into a transaction, each one of them has the option (of cancelling) so long as they have not parted and are still together”, the word ma (translated here as “so long as”) refers to the time during which they have not yet parted. And the words “and are still together” reinforce the idea of them not having parted yet. From this we learn that if the two men concluded the deal by phone, then in this case there is no option of cancelling the deal; as soon as one of them says: I will sell to you, and the other one says: I will buy from you, then the transaction becomes binding.
End quote from ash-Sharh al-Mumti`, 8/262.
But if the purchase is done via the Internet, it is not possible to cancel it after agreeing to it, or for the seller to stipulate that. Thus the option of cancelling is waived in that case, and the purchase becomes binding as soon as the purchaser agrees, and he has no right to cancel the transaction unless there is a valid reason to do so, because the option to cancel is waived if one of the two parties to the transaction stipulates that there is no option to cancel and the other party agrees.
(End quote from al-Mughni, 6/15-16)
And Allah knows best.