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:58:4

And he who does not find ˹a slave˺ - then a fast for two months consecutively before they touch one another; and he who is unable - then the feeding of sixty poor persons. That is for you to believe ˹completely˺ in Allah and His Messenger; and those are the limits ˹set by˺ Allah. And for the disbelievers is a painful punishment.  

And he who cannot find ˹the wherewithal˺, ˹to set free˺ a slave, then ˹his redemption shall be˺ the fasting of two successive months before they touch one another. And if he is unable, to fast, then ˹the redemption shall be˺ the feeding of sixty needy persons, as an obligation upon him, that is, before they touch one another: understanding the unrestricted ˹prescription˺ as ˹having the same restriction as˺ the restricted one. For every needy person ˹he should give˺ one mudd measure of the principal food of the town. This, namely, lightening of the atonement is, so that you may believe in God and His Messenger. And these, namely, the rulings mentioned, are God’s bounds; and for the rejecters, of them, there is a painful chastisement.
القرآن:٥٨:٤

فَمَنْ لَمْ يَجِدْ فَصِيَامُ شَهْرَيْنِ مُتَتَابِعَيْنِ مِنْ قَبْلِ أَنْ يَتَمَاسَّا ۖ فَمَنْ لَمْ يَسْتَطِعْ فَإِطْعَامُ سِتِّينَ مِسْكِينًا ۚ ذَٰلِكَ لِتُؤْمِنُوا بِاللَّهِ وَرَسُولِهِ ۚ وَتِلْكَ حُدُودُ اللَّهِ ۗ وَلِلْكَافِرِينَ عَذَابٌ أَلِيمٌ  

{فمن لم يجد} رقبة {فصيام شهرين متتابعين من قبل أن يتماسا فمن لم يستطع} أي الصيام {فإطعام ستين مسكينا} عليه: أي من قبل أن يتماسا حملا للمطلق عل المقيد لكل مسكين مد من غالب قوت البلد {ذلك} أي التخفيف في الكفارة {لتؤمنوا بالله ورسوله وتلك} أي الأحكام المذكورة {حدود الله وللكافرين} بها {عذاب أليم} مؤلم.