The Messenger of Allah ﷺ as saying: If anyone buys sheep or goat whose udders have been tied up and he milked it, he may keep it if he is pleased with it, or he may return it if he is displeased with it. There is one sa' of dates (which he must give to the seller) for milking it.
قَالَ رَسُولُ اللَّهِ ﷺ مَنِ اشْتَرَى غَنَمًا مُصَرَّاةً احْتَلَبَهَا فَإِنْ رَضِيَهَا أَمْسَكَهَا وَإِنْ سَخِطَهَا فَفِي حَلْبَتِهَا صَاعٌ مِنْ تَمْرٍ