Bhagavad Gita 17.20

Chapter 17: The three kinds of faith

दातव्यमिति यद्दानं दीयतेऽनुपकारिणे ।
देशे काले च पात्रे च तद्दानं सात्त्विकं स्मृतम् ॥ २० ॥

That alms given to one who does nothing in return, believing that a gift ought to be made in a fit place and time to a worthy person, that alms is accounted pure.

Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.