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.
quran:92:18

˹He˺ who gives ˹from˺ his wealth to purify himself  

he who gives his wealth to purify himself, offering it as a ˹means of self˺ purification before God, exalted be He, by making this payment for the sake of God, exalted be He, and not for show or the sake of reputation, so that he ˹or the offering˺ stands purified in the sight of God. This ˹verse˺ was revealed regarding the truthful one (al-siddīq) ˹Abū Bakr˺, may God be pleased with him, when he purchased Bilāl ˹the Ethiopian˺, who was being tortured on account of his faith, and then freed him, whereat the disbelievers said, ‘He only did this in return for a favour which he ˹must have˺ owed him’, and so the following was revealed:
القرآن:٩٢:١٨

الَّذِي يُؤْتِي مَالَهُ يَتَزَكَّىٰ  

{الذي يؤتي ماله يتزكى} متزكيا به عند الله تعالى بأن يخرجه لله تعالى لا رياء ولا سمعة، فيكون زاكيا عند الله، وهذا نزل في الصدّيق ؓ لما اشترى بلالا المعذب على إيمانه وأعتقه، فقال الكفار: إنما فعل ذلك ليد كانت له عنده فنزلت.