The Messenger of Allah ﷺ forbade muhaqalah, muzabanah, mukhabarah, and reserving an unspecified portion of a sale unless its amount is known.
أن رسول الله ﷺ نهي عن المحاقلة، والمزابنة، والمخابرة، والثنيا إلا أن تعلم.
Abu Dawud (3405), Tirmidhi (1290), and Nasai (3911) all narrated it from the hadith of Abbad bin Awwam, who said, Sufyan bin Husayn informed me, from Yunus bin Ubayd, from Ataa, from Jabir, and he mentioned it. Tirmidhi said, "This is a hasan sahih gharib hadith from this route, from the hadith of Yunus bin Ubayd, from Ataa, from Jabir." Its chain is hasan due to the discussion surrounding Sufyan bin Husayn, except that his narration is considered hasan when it does not concern Zuhri, and this hadith is of that kind. The basic content of this hadith is found in the Sahihayn, but none of the compilers of the three Sunan mentioned "the exception" except them.The unspecified exception is problematic because it leads to dispute. But if it is known, there is no harm in it, such as when someone sells the fruit of an orchard and excludes from it a known portion, like a third or a quarter or similar. This is permissible. This differs from a case where he excludes an unknown portion, in which case the sale becomes void, because the sale would then be one of unknown quantity.