Yahya bin Khaalid (rahimahullah) narrates:
Once, Ebrahim bin ‘Uyainah was imprisoned on account of an outstanding debt which amounted to more than forty-thousand dirhams. Hence, some of his friends went to different people collecting funds to pay his debt and secure his release.
When they came to Imaam Abu Hanifah (rahimahullah), he enquired, “How much is his debt?” They replied, “It is more than forty-thousand dirhams.” Imaam Abu Hanifah (rahimahullah) next asked, “Have you already collected money from others?” When they replied in the affirmative, Imaam Abu Hanifah (rahimahullah) said, “Return whatever money you have collected to those from whom you took it. I will settle the entire debt that he is owing.”
(‘Uqood-ul-Jummaan pg. 235)