Sahih Muslim Book 10, Hadith Number 3791.

Chapter : Command of killing dogs and then its abrogation, and prohibition of keeping them but for hunting and protection of lands or cattle or like that.

Hudhaifa (Allah be pleased with him) reported: A servant from amongst the servants of Allah was brought to Him whom Allah had endowed with riches. He (Allah) said to him: What (did you do) in the world? (They cannot conceal anything from Allah) He (the person) said: O my Lord, You endowed me with Your riches. I used to enter into transactions with people. It was my nature to be lenient to (my debtors). I showed leniency to the solvent and gave respite to the insolvent, whereupon Allah said: I have more right than you to do this to connive at My servant. ‘Uqba b. ‘Amir al-Juhani and Abu Mas’ud said: This is what we heard from Allah’s Messenger (may peace be upon him).