Allah says: do not consume one another's wealth unjustly, but only through trade by mutual consent (4:29). A sale needs the agreement of both parties, a lawful thing that is owned by the seller, a known price and a known item. The Prophet ﷺ said that the two parties of a sale have the option as long as they have not separated.
1The conditions
Mutual consent of both parties, free of force and cheating.
The seller owns the item and is able to deliver it. The Prophet ﷺ said: do not sell what is not with you.
The item and the price are known, and the item is lawful and useful.
The terms are clear, so that there is no gharar (excessive uncertainty).
2Options and defects
The option of the session (khiyar al-majlis): both parties can cancel as long as they are together, in the hadith. The Hanafi and Maliki schools do not take this literally and say the contract is binding on the agreement.
The option of defect: a buyer who finds a hidden defect may return the item or keep it with compensation.
Honest description: the seller must state faults he knows of. Hiding them is cheating.
3Conditions in contracts
Muslims are bound by their conditions, except a condition that makes the lawful unlawful or the unlawful lawful (Abu Dawud, graded hasan sahih by many).
There is to be neither harm nor reciprocating harm (Ibn Majah). This is a general rule of fiqh.
Where the schools differ
The four Sunni schools agree on the main ruling above and differ in these points. No school is preferred here.
The option of the session. the Shafi'i and Hanbali schools apply the hadith literally, and the Hanafi and Maliki schools hold that the contract is binding as soon as the offer and acceptance are made.
O les croyants! Que les uns d'entre vous ne mangent pas les biens des autres illégalement. Mais qu'il y ait du négoce (légal), entre vous, par consentement mutuel. Et ne vous tuez pas vous-mêmes. Allah, en vérité, est Miséricordieux envers vous.
O les croyants! Quand vous contractez une dette à échéance déterminée, mettez-la en écrit; et qu'un scribe l'écrive, entre vous, en toute justice; un scribe n'a pas à refuser d'écrire selon ce qu'Allah lui a enseigné; qu'il écrive donc, et que dicte le débiteur: qu'il craigne Allah son Seigneur, et se garde d'en rien diminuer. Si le débiteur est gaspilleur ou faible, ou incapable de dicter lui-même, que son représentant dicte alors en toute justice. Faites-en témoigner par deux témoins d'entre vos hommes; et à défaut de deux hommes, un homme et deux femmes d'entre ceux que vous agréez comme témoins, en sorte que si l'une d'elles s'égare, l'autre puisse lui rappeler. Et que les témoins ne refusent pas quand ils sont appelés. Ne vous lassez pas d'écrire la dette, ainsi que son terme, qu'elle soit petite ou grande: c'est plus équitable auprès d'Allah, et plus droit pour le témoignage, et plus susceptible d'écarter les doutes. Mais s'il s'agit d'une marchandise présente que vous négociez entre vous: dans ce cas, il n'y a pas de péché à ne pas l'écrire. Mais prenez des témoins lorsque vous faites une transaction entre vous; et qu'on ne fasse aucun tort à aucun scribe ni à aucun témoin. Si vous le faisiez, cela serait une perversité en vous. Et craignez Allah. Alors Allah vous enseigne et Allah est Omniscient.
From the Sunnah
Sahih al-Bukhari 2107Authentic collection
The point of the hadith: The buyer and the seller have the option to cancel or to confirm as long as they have not separated.
Read the Arabic text
حَدَّثَنَا صَدَقَةُ، أَخْبَرَنَا عَبْدُ الْوَهَّابِ، قَالَ سَمِعْتُ يَحْيَى، قَالَ سَمِعْتُ نَافِعًا، عَنِ ابْنِ عُمَرَ، رضى الله عنهما عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " إِنَّ الْمُتَبَايِعَيْنِ بِالْخِيَارِ فِي بَيْعِهِمَا، مَا لَمْ يَتَفَرَّقَا، أَوْ يَكُونُ الْبَيْعُ خِيَارًا ". قَالَ نَافِعٌ وَكَانَ ابْنُ عُمَرَ إِذَا اشْتَرَى شَيْئًا يُعْجِبُهُ فَارَقَ صَاحِبَهُ.
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Fiqh questions
Conditions of a valid sale
Allah says: do not consume one another's wealth unjustly, but only through trade by mutual consent (4:29). A sale needs the agreement of both parties, a lawful thing that is owned by the seller, a known price and a known item. The Prophet ﷺ said that the two parties of a sale have the option as long as they have not separated.
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.