Abu Huraira reported God’s messenger as saying, “The believing man or woman continues to have affliction in person, property and children so that they (this is a little difficult to translate. The Arabic has “he”, but the pronoun refers to the man or woman mentioned. I have therefore compromised by using the plural) may finally meet God free from sin.”
Tirmidhi transmitted it, and Malik transmitted something similar. Tirmidhi said this is a hasan sahih tradition.
He reported God’s messenger as saying, “The magnitude of the reward goes along with the magnitude of the affliction. When God who is great and glorious loves people He afflicts them, and those who accept it gladly receive God’s good pleasure, but those who are displeased receive God’s displeasure.
Muhammad b. Khalid as-Sulami on his father’s authority said his grandfather reported God’s messenger as saying, “When God has previously decreed for a servant a rank which he has not attained by his action, He afflicts him in his body, or his property, or his children. He then enables him to endure that so that He may bring him to the rank previously decreed for him by God.”
Anas reported God’s messenger as saying, “When God has a good purpose towards His servant He gives him punishment beforehand in this world, but when He has an evil purpose towards His servant He refrains from dealing with his sin till He takes from him full payment for it on the day of resurrection.”