Is It Permissible to Sell Back to the Seller What Has Not Yet Been Received?
Question

In October 2016, it was the time of the date harvest and sale of the harvest by the farmers to the date dealers at competitive prices. Praise be to Allah, I bought ten tons of top-quality dates at the seasonal price, which is 5.5 dinars. But when I wanted to receive the quantity referred to above, the seller started to delay delivery, until finally he admitted that he did not possess this quantity of dates and he did not have the money to buy that quantity and quality of dates from the market. He wants to buy it back from me on credit, and without meeting the condition of exchange on the spot. Praise be to Allah and by the grace of Allah, may He be glorified and exalted, I did not agree to sell it back to him because I had not received it, and I insisted that he should deliver what I had ordered from him. But because a long time had passed, and after the end of Ramadan, this product became very scarce in the market, and most likely this seller who has been delaying delivery, even if he has the money now, will not be able to deliver my order to me, because the price has gone up and is now 11 dinars, and there is no one who can give you this large quantity even at this price. It is clear that this seller, who has been delaying delivery of my order, and after checking the market, will never be able to deliver my order with the same specifications and quantity until October of this year, after waiting for the new harvest. Please note that the price of a kilogram of dates will drop from 11 dinars to the regular harvest season price, which is 5.5 dinars, and I will lose the profit I could have made, which is 3.5-4.5 dinars, after deducting transportation and shipping costs. My question is: I do not know if I can sell to him without the exchange taking place on the spot. It seems that it is not permissible, on the grounds that dates are one of the types of food for which it is stipulated that the exchange should take place on the spot and it should be sold to a different merchant. Or should I ask him to compensate me for the profit I could have made, were it not for his clear delay in delivering my product for ten months and preventing me from benefiting from my cash by doing business with it, since it caused me to miss out on more than one opportunity by delaying delivery of the dates I could have sold?
Praise be to Allah.Is it permissible to sell back to the seller what has not yet been received?
It is permissible to sell these dates back to the seller before receiving them, according to the more correct view. This comes under the heading of selling what is to be delivered [in a Salam transaction, when payment has been made in advance] before receiving it. 
So it is permissible to sell it back to the seller, because selling a debt to the one who owes it is permissible. 
But that is subject to certain conditions, one of which is that you should sell it to him at today’s price, meaning the price on the day of the sale, or less, but not more. 
Another condition is that if you sell it to him for cash, then it is permissible for him to pay immediately or sometime in the future. 
But if you sell it to him in return for wheat and the like, it is forbidden to delay payment, and the exchange must be made on the spot. Also, it is not permissible for you to sell it to him in return for dates to be delivered sometime in the future with an additional amount, because when selling dates for dates it is stipulated that they should be of equal amounts and the exchange should take place on the spot.
This is the view favoured by Shaykh Al-Islam Ibn Taymiyah and Ibn Al-Qayyim (may Allah have mercy on them). It is also the view of Ibn `Abbas (may Allah be pleased with him), and was narrated in one report from Ahmad (may Allah have mercy on him).
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said: 
“If someone were to say: Is it permissible to sell something that was to be delivered before having received it [ٍalam transaction]? The answer is: Yes, it is permissible to sell it back to the one who was supposed to deliver it. According to Shaykh Al-Islam, it is permissible to sell it even to a third party, but there are some reservations about that, because in reality, if you sell it to a third party, he may not be able to receive it. Moreover, if you sell it to a third party for something that may be sold for payment later, this means that he is selling something that he has not yet received.
The evidence for the permissibility of selling it to a third party is not clear, and Shaykh Al-Islam regards it as permissible to sell a debt to a third party, but that is subject to the condition that he has the ability to receive it.
But if he sells it back to the person who sold it to him [in a Salam transaction] and was supposed to deliver it to him later on, then there are three conditions which must be met:

The first condition: He should not make a profit, such as selling the goods at the current price, because if he sells them for more than the current price, then he will be making a profit on something that is not in his possession and for which he is not liable. The Prophet (blessings and peace of Allah be upon him) forbade making a profit on something that is not in one’s possession and for which one is not liable. For example, if a person entered into a Salam transaction to buy one hundred Sa`s of wheat, paying in advance for it to be delivered later, then when the time for delivery came its value was now 200 Dirhams only, so he says: I will sell it back to you for 250 Dirhams, that is not permissible, because he is making a profit on this wheat before it came into his possession and he became liable for it, as he did not take possession of it and did not receive it. Thus he will have made a profit on something that was not in his possession and for which he was not liable. Moreover, in the Hadith of Ibn `Umar (may Allah be pleased with him) it says: “There is nothing wrong with accepting a deal on the basis of the current price, so that he will not be making a profit on something that is not in his possession and for which he is not liable.”

So if the hundred sa`s are worth 200 dirhams, and he sells it back to him for 150, that is permissible, because if it is permissible to sell it at the current price, then it is more appropriate to say that it is permissible to sell it back to him for a lower price.
Because we gave as the reason for it not being permissible to sell it for more than the current price as being so that he does not make a profit on that which did not come into his possession and for which he did not become liable, in this case he is not making a profit; rather he is incurring a loss.
What is meant by the current price is that it should not be more than that; if it is less than that, that is fine.

The second condition: The exchange should take place before parting, if he sold him something that is subject to Riba An-Nasi’ah, for example, selling wheat for barley, one hundred Sa`s of wheat for two hundred sa`s of barley. This is permissible, on condition that the exchange takes place on the spot, before parting, because when selling wheat for barley, it is stipulated that the exchange should take place on the spot, before parting, because of the Hadith of Ibn `Umar (may Allah be pleased with him). There is nothing wrong with accepting the deal on the basis of the current price, so long as you have not parted and there is nothing still owing between you, because it is permissible to sell Dirhams for Dinars or Dinars for Dirhams, but when selling Dirhams for Dinars, it is stipulated that the exchange should take place on the spot, before parting.
The third condition: That should not be made the price for another Salam transaction [payment in advance for something to be delivered later on], because if he does that, in most cases he will make a profit on that, in which case he is making a profit on something of which he did not take possession and did not become liable for. For example, when the time comes for delivery of the one hundred Sa`s of wheat, the two parties say: We will make it a payment in advance for five sheep, because payment for animals in advance is permissible, as noted above, five sheep of such and such a description, to be delivered in one year’s time. This is not permissible, because usually that is only done to make a profit, as these five sheep are equal in value to 120 Sa`s [of wheat], and because this leads to messing about with the debt, as every time his debt becomes due, he will make it a payment in advance for something else. This is a trick aimed at messing about with what is owed and increasing what the debtor owes in this way; every time the debt becomes due, he makes it a down payment for another Salam transaction, and so on, until what is owed accumulates and increases.

So what is more likely to be the case is that selling the debt [what you are owed] is permissible, but it is subject to the three conditions mentioned above.
According to our Madhhab, however, selling it is not permissible at all. The evidence for that is the Hadith which says that whoever pays in advance for something to be delivered later on [Salam transaction] should not divert the deal to something else, as noted above.
But this Hadith is inauthentic, as was noted by Ibn Al-Qayyim in Tahdheeb As-Sunan.
Even if we assume that it is authentic, we should interpret it as meaning that the one who paid in advance for something to be delivered later on should not divert it to someone else, meaning to someone other than the one who paid for it in advance. In other words, he should not make it capital for a new Salam transaction.
But if we say that the hadith is inauthentic, then selling what you are owed after having paid for it in advance is permissible in principle, because of the general meaning of the verse in which Allah, may He be exalted, says (interpretation of the meaning):
{Allah has permitted trade} [Al-Baqarah 2:275]
Moreover, the Hadith of Ibn `Umar (may Allah be pleased with him) indicates that such transactions are permissible, because there is no difference between what is owed in a Salam transaction [payment in advance] and any other transaction. Whoever claims that there is a difference between what is owed in the Salam transaction and other types of debts, let him explain that to us."(Ash-Sharh Al-Mumti`  9/87).
Demanding compensation for delayed delivery on prepaid goods 
If the seller delivers the dates to you, it is not permissible for you to demand compensation from him for missed opportunities, or for the expected profits [that you missed out on], no matter how long he delayed it, because compensation for a delay in paying a debt is Riba.
It says in a statement of the Islamic Fiqh Council regarding penalty clauses :
“The Council affirms its previous statements regarding penalty clauses that were mentioned in its statement on Salam transactions, no. 85 (2/9), the text of which is as follows: It is not permissible to stipulate a penalty in the event of delay in the delivery of goods for which payment was made in advance [Salam translation], because it is a kind of debt, and it is not permissible to increase the debt in the event of a delay in payment [...] and [the Council also affirms] its statement regarding selling by instalments, no. 51 (2/6), the text of which is as follows: If the purchaser (the debtor) delays payment of instalments beyond the stated term, it is not permissible to compel him to pay anything in addition to what is owed, with or without prior stipulation, because that is Riba, which is prohibited." (Qararat Al-Majma`,  p. 371)
Here it is worth noting that delaying payment is prohibited and incurs sin, because the Prophet (blessings and peace of Allah be upon him) said: “For a rich man to delay payment of what he owes is wrongdoing.” (Narrated by Al-Bukhari, 2400 and Muslim, 1564)
Delaying payment means taking too long to pay back what is owed, with no excuse.
Furthermore, the Prophet (blessings and peace of Allah be upon him) said: “Any delay on the part of one who can afford (to repay a debt) makes it permissible to dishonour him and punish him.” (Narrated by Abu Dawud, 3268, An-Nasa’i, 4689 and Ibn Majah (2427); classed as sound by Al-Albani in Irwa’ Al-Ghalil, 1434)
What is meant by it being permissible to dishonour him is that the lender may say: So and so is taking too long to pay what he owes me and is wronging me. What is meant by punishment here is detaining him, as was explained by Sufyan and others.
In conclusion, there is nothing wrong with you selling back to him the dates that he owes you in return for Dinars, on condition that it is done at the current market price.
Also, there is nothing wrong with delaying payment in full or in part, because when selling the dates for Dinars, there is no stipulation that the exchange should take place on the spot, before parting.
For more details, please see the following answers: 160559 , 169750 , 1810 , 
And Allah knows best.