Abu Rafi reported,

The Prophet ﷺ said, "The neighbor has the greatest right to property adjacent to his own."Yet some people have said that if a person buys a house for twenty thousand dirhams, there is no harm in resorting to a stratagem so that he buys the house for twenty thousand dirhams, paying nine thousand nine hundred and ninety-nine dirhams in cash and a single dinar for the remainder of the twenty thousand. Then if the holder of the right of pre-emption wishes to take it, he must take it for twenty thousand dirhams, otherwise he has no claim to the house. If the house is later found to belong to someone else, the buyer reclaims from the seller what he paid him, which is nine thousand nine hundred and ninety-nine dirhams plus one dinar, because once the sale was invalidated the currency exchange involving the dinar was likewise undone. And if he finds a defect in the house, and it was not claimed by another, he returns it to the seller for twenty thousand dirhams.So he permitted this deception among the Muslims, while the Prophet ﷺ said, "The sale between Muslims is free of disease, vice, and hidden defect."

Bukhari 6980

Sahih

حدثنا أبو نعيم حدثنا سفيان عن إبراهيم بن ميسرة عن عمرو بن الشريد

عن أبي رافع قال

قال النبي ﷺ الجار أحق بصقبه وقال بعض الناس إن اشترى دارا بعشرين ألف درهم فلا بأس أن يحتال حتى يشتري الدار بعشرين ألف درهم وينقده تسعة آلاف درهم وتسع مائة درهم وتسعة وتسعين وينقده دينارا بما بقي من العشرين الألف فإن طلب الشفيع أخذها بعشرين ألف درهم وإلا فلا سبيل له على الدار فإن استحقت الدار رجع المشتري على البائع بما دفع إليه وهو تسعة آلاف درهم وتسع مائة وتسعة وتسعون درهما ودينار لأن البيع حين استحق انتقض الصرف في الدينار فإن وجد بهذه الدار عيبا ولم تستحق فإنه يردها عليه بعشرين ألف درهم قال فأجاز هذا الخداع بين المسلمين وقال النبي ﷺ بيع المسلم لا داء ولا خبثة ولا غائلة

البخاري 6980صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Trickery
Chapter
Trickery of the worker to receive gifts
Numbering
Darussalam 6980
Bukhari 6980