The Prophet ﷺ said, "Whoever seeks refuge in the name of Allah, grant him refuge. Whoever asks of you, give to him. Whoever invites you, accept his invitation. Whoever does you a kindness, repay him. If you cannot find the means to repay him, then pray for him until you know that you have repaid him."
حدثنا عفان حدثنا أبو عوانة حدثنا سليمان الأعمش عن مجاهد
عن النبي ﷺ قال من استعاذ بالله فأعيذوه ومن سألكم فأعطوه ومن دعاكم فأجيبوه ومن أتى إليكم معروفا فكافئوه فإن لم تجدوا ما تكافئونه فادعوا له حتى تعلموا أن قد كافأتموه
Its isnad is sahih, and it is a repetition of 5365 with this same isnad, and a longer version appears at 5743, see also the addendum at 1754. His saying, "and whoever does you a favor," in H it reads "does upon you" instead of "does you," which is an error, we corrected it from K and M. His saying, "what you can repay him for," in a copy in the margin of M it reads "ma takafiuhu," which agrees with the earlier narration 5365, and we explained it there. His saying, "then repay him," it is written in K and M as "fakafaytumuhu," but the ya was not dotted in M and a hamza was placed above it.