Yahya related to me from Malik from Ibn Shihab from Abu Bakr ibn Abd ar-Rahman ibn al-Harith ibn Hisham that the Messenger of Allah ﷺ said, "Whenever a man sells wares and then the buyer becomes bankrupt and the seller has not taken any of the price and he finds some of his property intact with the buyer, he is more entitled to it than anyone else. If the buyer dies, then the seller is the same as other creditors with respect to it."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ أَيُّمَا رَجُلٍ بَاعَ مَتَاعًا فَأَفْلَسَ الَّذِي ابْتَاعَهُ مِنْهُ وَلَمْ يَقْبِضِ الَّذِي بَاعَهُ مِنْ ثَمَنِهِ شَيْئًا فَوَجَدَهُ بِعَيْنِهِ فَهُوَ أَحَقُّ بِهِ وَإِنْ مَاتَ الَّذِي ابْتَاعَهُ فَصَاحِبُ الْمَتَاعِ فِيهِ أُسْوَةُ الْغُرَمَاءِ