Sunan Ibn Majah
2359
Sahih+2

It was narrated from Abu Hurairah that the Prophet (ﷺ) said:“Any man who sells a product with the man who has become bankrupt, and he has not taken any of its price, it belongs to him, but if he had taken any of its price, then he is like any other creditor.”

SahihAl-Albani
SahihMuhammad Fouad Abd al-Baqi