Scholarly disagreement:
The scholars are unanimously agreed that both forms of ribā—excess (1) and deferment (nasīʾa)—are forbidden whenever one exchanges a single genus from among the six commodities explicitly named in the ḥadith of ʿUbāda ibn al-Ṣāmit. He said: “I heard the Messenger of Allah ﷺ forbid selling gold for gold, silver for silver, wheat for wheat, barley for barley, dates for dates, and salt for salt, unless it is equal for equal, hand to hand. Whoever gives more or takes more has fallen into ribā.” Muslim narrated this report.
The text is an unequivocal proof that any surplus is prohibited when the exchange involves the same genus of these specified items.
The prohibition of deferment is learned from reports such as the ḥadith of ʿUmar ibn al-Khaṭṭāb, in which the Messenger of Allah ﷺ said: “Gold for gold is ribā unless it is hāʾ wa hāʾ (immediately, hand to hand); wheat for wheat is ribā unless it is hāʾ wa hāʾ; dates for dates are ribā unless it is hāʾ wa hāʾ; and barley for barley is ribā unless it is hāʾ wa hāʾ.”
By contrast, selling one of these six kinds for a different one on credit is permissible, as the remainder of ʿUbāda’s ḥadith states: “When these varieties differ, sell as you wish, provided it is hand to hand.” All of this is a matter of scholarly consensus, except regarding the pairing of barley with wheat; some held that they constitute a single genus, whereas the correct view is that they are two distinct genera.
The Ẓāhirīs maintained that ribā does not extend beyond these six commodities because they deny the validity of analogy. The majority, however, extended the ruling to other items, though they disagreed about what should be included, their divergence stemming from different understandings of the effective cause that bars excess and deferment.
The scholars concur that the operative cause for gold and silver differs from that for the remaining four, and that each pair has a single cause. They then disagreed over what that cause is.
The well-known opinion attributed to Imām Aḥmad is that the cause for gold and silver is their being sold by weight, while for the other four it is their being sold by measure; anything sharing this cause is therefore attached to them. This view was also held by al-Nakhaʿī, al-Zuhrī, al-Thawrī, Isḥāq, and the Ḥanafīs. According to this position, ribā applies to every commodity sold by weight or by measure when exchanged for its own kind, whether edible—such as grains, sugar, and oils—or non-edible,