Praise be to Allah.
It is permissible to buy through the Internet, if the product can be described correctly and adequately, and is described in such a way as to remove any ambiguity, because one of the conditions of a sale being valid is that one should know about the product being sold, either by seeing it oneself or by having it clearly described.
It says in ar-Rawd al-Murbi‘ (p. 309):
… The sixth condition is that the item being sold should be known to both parties, because ambiguity may lead to deceit and harm. Knowing about the item being sold may be done either by seeing it, or seeing some of it that gives a clear idea about the rest of it, either comparable to something that already exists, or a sample that is shown, with delivery at a later date, but the time span does not affect the quality of the product.
We may add to that items of which the quality may be known by touching, smelling, or tasting.
Or a description may be sufficient in the case of salam transactions (in which payment is made immediately for goods to be delivered at a later date); in that case the description takes the place of seeing the item in the case of goods for which salam transactions are permissible. End quote.
If the transaction is done on the basis of a description, then the purchaser finds that the item is different from the description given, he has the right to cancel the transaction.
It says in Manaar as-Sabeel (1/309): … or an adequate description in the case of salam transactions, in the case of items for which the salam transaction is permissible, especially when the salam transaction is permissible with regard to that item. In that scenario, selling on the basis of a description is permissible, but if the delivered item is found to be different [from the description], the purchaser has the right to annul the transaction. End quote.
The transaction may not be regarded as completed on the Internet; rather it is completed when the product is received by the interested party, then if he wishes he buys it, and if he wishes he does not buy it [and he returns it]. This is clear.
So long as the seller is the one who paid the delivery agent, and agreed with the agent to deliver it, then he is the one who must pay the delivery fee, unless the seller clearly stated that the purchaser must pay the delivery fee whatever the case, or that he must pay the delivery agent, instead of the purchaser.
If it is the case that the delivery fee is separate from the price of the item being sold, and that the seller hired the delivery agent on behalf of the purchaser, and not on behalf of himself, then in this case the fee of the delivery agent is not completely separate from the transaction, and in this case the seller’s arranging for the delivery of the item is not regarded as acting completely on behalf of the purchaser; rather he has an interest to be served by delivering his product to the one who wants it, just as the purchaser also has an interest. Hence many sellers promise free delivery, without adding anything to the price of the product, and what this means is that the seller is the one who should bear the costs of delivery.
If there is a scenario where it is equally possible that either party could be responsible for paying the delivery agent, and the purchaser ends up not benefitting from this transaction because the product is not of the quality he is looking for, and the purchaser did not state that he would bear the costs of delivery whatever the case, then it does not seem that he should be liable to pay those fees in this case. The most that the purchaser could be liable for is the agent’s fee for delivery connected to his purchase, and if he does not want to purchase the item, then he is not liable to pay the delivery costs.
This is confirmed, in the scenario mentioned in the question, because the seller sent him a product that was not of the quality he was seeking, so it seems to be a case of deceit or cheating the purchaser. Therefore liability is to be borne by the seller, and this is clear, in sha Allah.
Al-Bahooti (may Allah have mercy on him) said: If it is proven that the claimant was lying in his claim in such a way as to cause harm to the defendant, then he should be punished for lying and made to give compensation to the one who was wrongly accused [the defendant].
I say: He [the claimant] is liable for the losses incurred by the defendant as a result of his false accusation.
End quote from Kashshaaf al-Qinaa‘ (6/128).
And Allah knows best.