Sayyiduna Umar bin Al-Khattab (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "When selling gold for gold, it must be hand to hand (not on credit), likewise, when selling silver for silver, it must be hand to hand, and dates for dates must be hand to hand, and wheat for wheat must be hand to hand, and barley for barley must be hand to hand, and there should be no increase or decrease among these (commodities)."
Brief Explanation
(Explanation of Hadith 2613)
The meaning of «هَاءَ وَهَاءَ» is: the seller and the buyer should exchange the goods and the price at the same time, that is, this transaction should be hand to hand—take with this hand, give with that hand; the buyer gives the money and the trader delivers the goods, and there should be no increase or decrease in either commodity.
From this hadith, it is understood that if any item of the same kind is bought and sold in a single sitting, paid for in cash, and there is no increase or decrease, then this is a sale of currency (bay‘ al-sarf). It is permissible to buy and sell gold and silver in exchange for gold and silver, provided that it is not sold on credit and there is no increase or decrease. If gold is to be bought in exchange for gold, then the exchange can be made in a single sitting with the same weight. If the seller gives gold and the buyer, taking it on credit, pays the price later, or if the seller gives ten grams of gold and the buyer pays eleven grams, then this is an excess, and this is precisely the usury (riba) that is forbidden.
In the aforementioned hadith, five commodities are mentioned; in other ahadith, salt is also mentioned. Furthermore, in other narrations, it is stated that whoever gives more or takes more in these commodities has given or taken riba, and both the giver and the taker are equal in this.
These are a total of six commodities regarding which it has been said that increase and decrease in them is riba and forbidden, and there is consensus among all the scholars on this. All the scholars differ regarding whether, in commodities other than these six (gold, silver, dates, wheat, barley, and salt), if one thing is bought and sold, is it permissible to have credit and excess or not, such as millet, bajra, rice, chickpeas, etc.
The majority of scholars are of the opinion that wherever the cause (‘illah) of riba is found, that too will be considered riba. The literalists (Ahl al-Zahir) and Imam Shawkani rahimahullah and others have considered riba to be confined to these six commodities only, and not in other items.
And Allah knows best.