Liquidated damages clause
Some scholars permitted the inclusion of a liquidated damages clause and made effective its associated consequences.
Opinion of Hanbali scholars
They maintained the permissibility of a contractual provision stipulating that whoever buys an object, pays part of its price and defers the rest while the seller stipulates that, should the buyer defaults, he is entitled to the money paid in advance. They further stated that contractual provisions stipulated by either party are permissible in their school except those which make something prohibited lawful or what make something lawful prohibited and what has been specifically prohibited by Islamic law. The provision mentioned in the question is not prohibited and is permissible as long as it does not make lawful what is prohibited and does not prohibit what is lawful.
Al-Hattab, the Maliki scholar, mentioned in Iltizamat that the provision a wife includes in the marriage contract to the effect that her husband is to pay her a certain sum of money if he takes a second wife, is valid and he must fulfill it. This clearly demonstrates the permissibility of stipulations made for damages and the obligation of the defaulting party to fulfill it.
The provision mentioned in the question does not contain anything that contravenes Islamic law and the sum mentioned in the clause does not contain jahalah [ignorance] that can affect the validity of the contract. The provision is acknowledged by Hanbali scholars whose opinion we choose for fatwa due to the necessity of conducting transactions, customs and to prevent harm. And since the buyer withdrew from the sale, the seller is entitled to the amount of liquidated damages contained in the contract.
Allah Almighty knows best