Al-Baqara • EN-TAFSIR-IBN-ABBAS
﴿ إِن تُبْدُوا۟ ٱلصَّدَقَٰتِ فَنِعِمَّا هِىَ ۖ وَإِن تُخْفُوهَا وَتُؤْتُوهَا ٱلْفُقَرَآءَ فَهُوَ خَيْرٌۭ لَّكُمْ ۚ وَيُكَفِّرُ عَنكُم مِّن سَيِّـَٔاتِكُمْ ۗ وَٱللَّهُ بِمَا تَعْمَلُونَ خَبِيرٌۭ ﴾
“If you do deeds of charity openly, it is well; but if you bestow it upon the needy in secret, it will be even better for you, and it will atone for some of your bad deeds. And God is aware of all that you do.”
Allah then mentions almsgiving that is done in the open and that which is done secretly because they asked about it, saying: (If ye publish) if you show (your almsgiving) which is obligated upon you, (it is well, but if ye hide it) the supererogatory almsgiving (and give it to the poor) the folk of the Platform (ashab al-Suffah), (it will be better for you) than giving it in the open, but both are accepted from you, (and will atone for some of your ill deeds) in proportion of your almsgiving. (Allah is Informed of what ye do). He knows of the alms that you give.