The purchaser delayed payment; is it permissible to make an agreement with him that he will pay the outstanding balance in gold?
Question

If two people agree on the sale and purchase of a house and on a time for payment, then the purchaser delays payment, so he makes an agreement with the seller that he will pay off the value in gold, is that valid? What is the ruling on penalty clauses in a contract for the sale and purchase of land?
Praise be to Allah.Firstly:
If the purchaser delays payment of the price, and makes an agreement with the seller that he will pay off the amount in gold, that may be done in one of two ways:
-1- The first way is paying the balance in gold immediately. There is nothing wrong with that if it is based on the price of gold on the day that the payment is to be made, or less than that. This is regarded as an exchange between gold and what the man owes in Egyptian pounds, and making an exchange for what one owes is like immediately paying for what you have purchased.
The basic principle regarding that is the report narrated by Ahmad (6239), Abu Dawud (3354), an-Nasa’i (4582), at-Tirmidhi (1242) and Ibn Majah (2262) from Ibn ‘Umar (may Allah be pleased with him), who said: I used to sell camels for dinars [i.e to be paid at a later date] and accept dirhams, and I would sell them for dirhams and accept dinars. I asked the Messenger of Allah (blessings and peace of Allah be upon him) about that and he said: “There is nothing wrong with you accepting payment based on the current price, so long as you do not part when there is something still outstanding between you.”  
The hadith was classed as sahih by some of the scholars, such as an-Nawawi and Ahmad Shakir. Others classed it as sahih on the basis that it is the words of Ibn ‘Umar, not the words of the Prophet (blessings and peace of Allah be upon him), including al-Hafiz Ibn Hajar and al-Albani. See: Irwa’ al-Ghalil (5/173).
It is only prohibited to charge more than the current price of gold, so that the seller will not make a profit on something that he was never liable for.
Ibn Qudamah (may Allah have mercy on him) said: It is permissible to exchange one of the two currencies (gold and silver) for the other, in the case of purchasing or paying what one owes, according to most of the scholars.
End quote from al-Mughni (4/37); he quoted as evidence the hadith of Ibn ‘Umar.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said: What he must do is pay back what you loaned him in dollars, because this is the nature of the loan that you gave him.
But despite that, if you both agreed that he would give you Egyptian pounds, there is nothing wrong with that. Ibn ‘Umar (may Allah be pleased with him) said: I used to sell camels in al-Baqi‘ – or an-Naqi‘ – for dirhams, but we would accept the payment in dinars; and we would sell for dinars but accept the payment in dirhams. The Prophet (blessings and peace of Allah be upon him) said: “There is nothing wrong with you accepting payment based on the current price, so long as you do not part when there is something still outstanding between you.” This is selling currency for currency of a different kind, so it is more akin to selling gold for silver.
So if you and he have agreed that he will give you Egyptian pounds instead of dollars, on condition that you do not take more in pounds than the equivalent at the time of the exchange, there is nothing wrong with that.
For example, if 2000 dollars is equivalent to 2800 pounds, it is not permissible for you to take 3000 pounds from him, but it is permissible for you to take 2800 pounds. And it is permissible for you to take only 2000 dollars from him, meaning that you take the current price or less, and do not take more, because if you take more, then you will have made a profit on something for which you were never liable, and the Prophet (blessings and peace of Allah be upon him) forbade making a profit on something for which you were never liable. But if you take less, this is like taking some of what is due to you and letting him off regarding the rest, and there is nothing wrong with that."(Fatawa Islamiyyah (2/414).
-2- The second way is where he does not give him gold at present; rather they both agree on gold to be given later on, based on the price of gold on the day of the missed payment or at the current price on the day the agreement was made. This is haram, because it is a delayed exchange, as you are exchanging what you are owed of pounds for gold to be delivered later on. This is riba (usury), because it is stipulated that when exchanging currency for gold, or vice versa, the exchange must be done immediately, on the spot, because of the report narrated by Muslim (1588) from Abu Hurayrah, that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Dinar for dinar with no difference between them and dirham for dirham with no difference between them.”
And it was narrated that ‘Ubadah ibn as-Samit (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Gold for gold, silver for silver, wheat for wheat, barley for barley, dates for dates, salt for salt, like for like, same for same, hand to hand. But if these commodities differ, then sell as you like, as long as it is hand to hand.” Narrated by Muslim (1587).
Currencies come under the same rulings as gold and silver, so any exchange must be hand to hand.
Based on that, the buyer still owes pounds, and it is not permissible to make an agreement that he owes gold of whatever price.
The solution in this case, so that the seller’s rights will not be affected, is for him to cancel the deal, take back the house and give back the instalments that the purchaser had paid to him.
The scholars have stated that it is permissible for the seller to cancel the deal if the purchaser is in financial difficulty or is taking too long to pay.
It says in al-Mawsu‘ah al-Fiqhiyyah (32/136): Ibn Taymiyah said that if the purchaser is in financial difficulty or is taking too long to pay, the seller may cancel the deal so as to ward off the harm to which dispute may lead. He said in al-Insaf: This is the correct view. End quote.
Shaykh Ibn ‘Uthaymin said: If the seller knows that the purchaser is in financial difficulty, then he has no choice. For example, if a man sells an item to someone thinking that he is rich, then he finds out that he is in financial difficulty, he has the right to cancel the deal, because allowing more time to pay could be detrimental to his own interests.
But if he sold this item to someone already knowing that he was in financial difficulty, he has no option to cancel, because he entered into the transaction fully aware [of the purchaser’s situation]."(Ash-Sharh al-Mumti‘  8/364).
He also said: If it turns out that the purchaser is the kind to take too long to pay, then the seller may cancel the deal, because some of those who take too long to pay may cause more trouble than the poor, for it may be that Allah will bless the poor man and he will pay what he owes, whereas if taking too long to pay is a person’s usual habit, then it will be very difficult to get him to pay it off. The correct view is that the seller may cancel the deal in order to protect his wealth.
Another benefit [of being allowed to cancel the deal], in addition to protecting the seller’s wealth, is that it will serve as a deterrent to the one who takes too long to pay, because if such a person knows that if he takes too long to pay, the deal will be cancelled, he will shape up and will not take too long to pay in the future."(Ash-Sharh al-Mumti‘ (8/364).
Secondly:
It is permissible to stipulate penalty clauses in financial transactions, except in contracts in which there is a commitment to pay off a debt. It is not permissible, for example, to stipulate that the one who purchases land for payment to be made later or by instalments must pay something in addition to the price if he delays payment, because this extra payment is in addition to the original amount of the debt, and that is blatant riba.
With regard to duties and obligations other than the debt, it is permissible to stipulate a penalty regarding them, such as if it is stipulated that the one who cancels the deal must pay some money, or if the contractor delays carrying out the work, he must pay such and such for each day. For more details regarding that, please see the answers to questions no. 112090 and 354831 .
And Allah knows best.