The Prophet ﷺ forbade Muzabana; and Muzabana is the selling of fresh fruit (without measuring it) for something by measure on the basis that if that thing turns to be more than the fruit, the increase would be for the seller of the fruit, and if it turns to be less, that would be of his lot. Narrated Ibn ʿUmar from Zaid bin Thabit that the Prophet ﷺ allowed the selling of the fruits on the trees after estimation (when they are ripe).
أَنَّ النَّبِيَّ ﷺ نَهَى عَنِ الْمُزَابَنَةِ قَالَ وَالْمُزَابَنَةُ أَنْ يَبِيعَ الثَّمَرَ بِكَيْلٍ إِنْ زَادَ فَلِي وَإِنْ نَقَصَ فَعَلَىَّ قَالَ وَحَدَّثَنِي زَيْدُ بْنُ ثَابِتٍ أَنَّ النَّبِيَّ ﷺ رَخَّصَ فِي الْعَرَايَا بِخَرْصِهَا