Mishkat al-Masabih 2224
وَعَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «اللَّهُمَّ إِنِّي اتَّخَذْتُ عِنْدَكَ عَهْدًا لَنْ تُخْلِفَنِيهِ فَإِنَّمَا أَنَا بَشَرٌ فَأَيُّ الْمُؤْمِنِينَ آذَيْتُهُ شَتَمْتُهُ لَعَنْتُهُ جَلَدْتُهُ فَاجْعَلْهَا لَهُ صَلَاةً وَزَكَاةً وَقُرْبَةً تُقَرِّبُهُ بِهَا إِلَيْكَ يَوْم الْقِيَامَة»
From him, who said: The Messenger of Allah ﷺ said: "O Allah, I have taken a promise from You which You will not break for me. I am only a human being, so whichever of the believers I have hurt, insulted, cursed or whipped, make that for him a prayer, a purification and a nearness by which You bring him near to You on the Day of Resurrection."