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:8:3

The ones who establish prayer, and from what We have provided them, they spend.  

Those who observe the prayers, performing them as they ought to be ˹performed˺, and who expend, in obedience to God, from that with which We have provided them.
القرآن:٨:٣

الَّذِينَ يُقِيمُونَ الصَّلَاةَ وَمِمَّا رَزَقْنَاهُمْ يُنْفِقُونَ  

{الذين يقيمون الصلاة} يأتون بها بحقوقها {ومما رزقناهم} أعطيناهم {ينفقون} في طاعة الله.

See similar narrations below:

Collected by Qurʾān
quran:2:3

Who believe in the unseen, establish prayer, and spend out of what We have provided for them,  

who believe in, that is, who accept the truth of, the Unseen, what is hidden from them of the Resurrection, Paradise and the Fire; and maintain the prayer, that is to say, who perform it giving it its proper due; and of what We have provided them, that is, of what we have bestowed upon them, expend, in obedience to God;
القرآن:٢:٣

الَّذِينَ يُؤْمِنُونَ بِالْغَيْبِ وَيُقِيمُونَ الصَّلَاةَ وَمِمَّا رَزَقْنَاهُمْ يُنْفِقُونَ  

{الذين يؤمنون} يصدِّقون {بالغيب} بما غاب عنهم من البعث والجنة والنار {ويقيمون الصلاة} أي يأتون بها بحقوقها {ومما رزقناهم} أعطيناهم {ينفقون} في طاعة الله.