Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrated: The Ansar said among themselves: "If only we could gather wealth for the Messenger of Allah (peace and blessings be upon him), so that he may keep his hand open and no one would stand between him and it." So they came to the Messenger of Allah (peace and blessings be upon him) and said: "O Messenger of Allah! We wish to gather something for you from our wealth." Thereupon Allah, the Mighty and Majestic, revealed: "Say: I do not ask you for any reward for it except love for kinship" [Surah al-Shura: 23]. They went out disagreeing. Some of them said: "Did you see what the Messenger of Allah (peace and blessings be upon him) said?" And some of them said: "He (peace and blessings be upon him) only said this so that we would fight on behalf of his (peace and blessings be upon him) household and support them." So Allah, the Mighty and Majestic, revealed: "Or do they say: He has invented a lie against Allah?" [Surah al-Shura: 24], up to His saying: "And He it is Who accepts repentance from His servants" [Surah al-Shura: 25]. the Messenger of Allah (peace and blessings be upon him) turned them towards repentance with this verse, up to His saying: "And He answers those who believe and do righteous deeds, and gives them more out of His bounty" [Surah al-Shura: 26]. These are the ones who had said this, meaning: repent to Allah and seek His forgiveness.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12331