Allah has permitted trade and forbidden riba (2:275), commands the believers to give up what remains of it (2:278), and says not to devour riba, doubled and multiplied (3:130). The Prophet ﷺ taught the rule for the six items: gold for gold, silver for silver, wheat for wheat, barley for barley, dates for dates and salt for salt: like for like, equal for equal, hand to hand.
1
The two kinds
Riba al-nasi'ah (riba of delay): extra payment in return for time, the interest on a loan. This is forbidden by consensus.
Riba al-fadl (riba of excess): exchanging the same kind of goods in unequal amounts, such as one kilogram of good dates for two of poor dates. It is forbidden, as in the hadith.
2
Practical rulings
Money exchange (currency for currency) must be hand to hand, and in equal amounts if it is the same currency.
Any loan that brings the lender a benefit as a condition is riba.
A late-payment fee that increases with time on a debt is riba, but a fee for real costs is not.
Giver, taker, writer and the two witnesses of riba all share in the sin, as the Prophet ﷺ taught.
3
The alternatives
Murabaha (cost-plus sale), ijarah (leasing), musharakah and mudarabah (partnerships), and salam, as practised by Islamic finance.
A good loan (qard hasan), repaid with the same amount.
Where the schools differ
The four Sunni schools agree on the main ruling above and differ in these points. No school is preferred here.
What riba al-fadl applies to. the Hanafi and Hanbali schools say things sold by weight or measure of the same kind; the Shafi'i school says foods and currencies; the Maliki school says staple foods that can be stored, and currencies. All agree on the six items named in the hadith.
Paper currency and riba. the majority of contemporary councils treat banknotes as gold and silver for the rules of riba and exchange.
Those who swallow usury cannot rise up save as he ariseth whom the devil hath prostrated by (his) touch. That is because they say: Trade is just like usury; whereas Allah permitteth trading and forbiddeth usury. He unto whom an admonition from his Lord cometh, and (he) refraineth (in obedience thereto), he shall keep (the profits of) that which is past, and his affair (henceforth) is with Allah. As for him who returneth (to usury) - Such are rightful owners of the Fire. They will abide therein.
Allah has permitted trade and forbidden riba (2:275), commands the believers to give up what remains of it (2:278), and says not to devour riba, doubled and multiplied (3:130). The Prophet ﷺ taught the rule for the six items: gold for gold, silver for silver, wheat for wheat, barley for barley, dates for dates and salt for salt: like for like, equal for equal, hand to hand.
Is this a fatwa?
No. It is a summary of well-known rulings with their evidence. For your own case, ask a qualified scholar.
What if my school differs from this answer?
Follow the view of the school you follow and the scholar who teaches you. The page lists the differences of the four schools.