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.
¡Creyentes! No os devoréis la hacienda injustamente unos a otros. Es diferente si comerciáis de común acuerdo. No os matéis unos a otros. Alá es misericordioso con vosotros.
¡Creyentes!. Si contraéis una deuda por un plazo determinado, ponedlo por escrito. Que un escribano tome fiel nota en vuestra presencia, sin rehusarse a escribir como Alá le dé a entender. Que escriba. Que el deudor dicte en el temor de Alá, su Señor, y que no deduzca nada. Y si el deudor fuera necio, débil o incapaz de dictar, que dicte su procurador con fidelidad. Llamad, para que sirvan de testigos, a dos de vuestros hombres; s no los hay, elegid a un hombre y a dos mujeres de entre quienes os plazcan como testigos, de tal modo que si una yerra, la otra subsane su error. Que los testigos no se sustraigan cuando se les llame. Que no os repugne subscribir una deuda, sea pequeña o grande, precisando su vencimiento. Esto es más equitativo ante Alá, es más correcto para el testimonio y da menos lugar a dudas. A menos que se trate de una operación concluida entre vosotros sin intermediarios; entonces, no hay inconveniente en que no lo pongáis por escrito. Pero ¡tomad testigos cuando os vendáis algo! ¡Y que no se moleste al escribano ni al testigo! Si lo hacéis, cometeréis una iniquidad. ¡Temed a Alá! Alá os instruye. Alá es omnisciente.
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.