Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.

Allah puts his servants through in this world to cleanse them before their final accounting

tirmidhi:2396Qutaybah > al-Layth > Yazīd b. Abū Ḥabīb > Saʿd b. Sinān > Anas

"When Allah wants good for his slave, He hastens his punishment in the world. And when He wants bad for His slave, He withholds his sins from him until he appears before Him on the Day of Judgement."

And with this (same) chain, (it was reported) from the Prophet ﷺ who said: "Indeed greater reward comes with greater trial. And indeed, when Allah loves a people He subjects them to trials, so whoever is content, then for him is pleasure, and whoever is discontent, then for him is wrath."  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Gharīb in this particular context.
الترمذي:٢٣٩٦حَدَّثَنَا قُتَيْبَةُ حَدَّثَنَا اللَّيْثُ عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ عَنْ سَعْدِ بْنِ سِنَانٍ عَنْ أَنَسٍ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ: «إِذَا أَرَادَ اللَّهُ بِعَبْدِهِ الْخَيْرَ عَجَّلَ لَهُ الْعُقُوبَةَ فِي الدُّنْيَا، وَإِذَا أَرَادَ اللَّهُ بِعَبْدِهِ الشَّرَّ أَمْسَكَ عَنْهُ بِذَنْبِهِ حَتَّى يُوَفَّى بِهِ يَوْمَ الْقِيَامَةِ۔»

وَبِهَذَا الإِسْنَادِ عَنِ النَّبِيِّ ﷺ قَالَ: «إِنَّ عِظَمَ الْجَزَاءِ مَعَ عِظَمِ الْبَلاَءِ۔ وَإِنَّ اللَّهَ إِذَا أَحَبَّ قَوْمًا ابْتَلاَهُمْ۔ فَمَنْ رَضِيَ فَلَهُ الرِّضَا، وَمَنْ سَخِطَ فَلَهُ السَّخَطُ۔»  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ هَذَا الْوَجْهِ

See similar narrations below:

Collected by Suyūṭī
suyuti:1109a
Request/Fix translation

  

السيوطي:١١٠٩a

"إذا أراد الله بعبده الخيرَ عجَّل له العقوبةَ في الدنيا، وإذا أراد الله بعبده الشرَّ أمسك عنه بذنبه حتى يوافى به يومَ القيامِة" .  

[ت] الترمذي حسن غريب، [ك] الحاكم في المستدرك عن أنس، [عد] ابن عدى في الكامل عن أبي هريرة