What is the ruling if the price was unfair, so he cancelled the deal, but there is a penalty for the one who cancels it?
Question

I went ahead and bought a piece of land, and I agreed with the owner on the price of 504,000. Then we wrote a provisional contract, stating that within ten days I would bring the money in instalments, then we would write the final contract and I would take possession of the piece of land. We stipulated a penalty clause of 50,000 for the one who changed his mind. In fact, I gave him instalments up to 309,000, after which I found out that the real price of this piece of land and the surrounding area was no more than 336,000, so I asked him to sell it to me for the actual market price, otherwise he should give my money back to me. But he refused to sell it to me for that price, and gave me back 259,000 only; in other words, he deducted the amount of the penalty (50,000). Did he have the right to do that?
Praise be to Allah.Firstly:
Ruling on penalty clauses between the parties to the transaction
It is permissible for the parties to a transaction to stipulate a penalty clause, stating that the one who cancels the transaction will pay a certain amount of money to his opposite number, because the basic principle regarding conditions is that they are valid, and because stipulating a penalty clause in contracts other than loans is valid and must be fulfilled, as we have explained in the answer to question no. 281085 .
Secondly:
This penalty clause is valid so long as there is nothing that would make it permissible to cancel the transaction according to Islamic teachings, such as a clause giving an option to cancel the deal, a defect in the product, or if the deal is unfair.
If you were deceived or were cheated in this transaction in which case you have the option of cancelling the deal in according with Islamic teachings, then you have the right to cancel the transaction and you are not bound by the penalty clause.
What is regarded as an unfair deal is one that is extremely unfair, not one that is slightly unfair.
Definition of an extremely unfair deal
The fuqaha’ differed concerning the definition of what is extremely unfair. Some of them define it as being one third more than the fair market price, some regard it as being one fifth more, and some said that the matter should be referred to what traders customarily regard as being extremely unfair.
In al-Mawsoo‘ah al-Fiqhiyyah (20/150), it says: What is meant by an unfair deal is one that is extremely unfair, according to the Hanafis and the Maalikis in their more correct view. According to one view among the Hanbalis, what matters is what is customarily deemed to be unfair by traders.
Even though their definitions vary as to what is unfair, they all lead to one meaning.
What matters is what is decided by those with experience, because they are the ones to be referred to in order to decide about defects and similar matters, which require experience in transactions.
The second view of the Maalikis and Hanbalis is that the definition of an unfair deal is when the deal is one third more than the fair market price. The third view among the Maalikis, is that it is when it is more than one third above the fair market price. End quote.
For more information, please see the answer to question no. 283811 .
Thirdly:
Once it is established that you have the option of cancelling the deal because of unfair pricing and deceit, you can return the land and take back the price you paid, or you can keep it, but in that case you cannot take back the difference between the price you paid and the market value.
It says in Kashshaaf al-Qinaa‘ (3/212): So the purchaser has the choice between returning the item that he bought or keeping it [and accepting the deal]. End quote.
And Allah knows best.