All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
It is permissible that two parties agree to sell and buy something from each other in the future. It is also permissible to specify a provision in the contract that stipulates an excessive pecuniary charge against a defaulting party, which is called the penalty clause. There is no evidence in the Sharee’ah that prohibits this provision. It also preserves people's rights from being neglected, tampered with, and so on.
However, if they have agreed on the sale, the buyer paid the price of the article and, after separation, the seller refused to deliver the article, the seller should be compelled to deliver. He has not the right to revoke the contract because it was concluded. In such a case, the judge should compel him (the seller) to hand over the sold article unless the buyer relieves him from such a transaction. If he does not want to waive it, the buyer is entitled to the value of the penalty clause.
The same applies to the buyer if he revokes the contract.
Allaah Knows best.