There are a few laws relevant to your question:
- It is forbidden to turn someone away. Instead, one must give at least something.
- One should investigate a pauper before giving a substantial gift, but need not do so for a minimal gift.
Kitzur Shulchan Aruch 34:8
אָסוּר לְהַחְזִיר אֶת הֶעָנִי שֶׁשָּׁאַל רֵיקָם. וַאֲפִלּוּ אַתָּה
נוֹתֵן לוֹ גְּרוֹגֶרֶת אַחַת, שֶׁנֶּאֱמַר, אַל יָשׂב דַּךְ נִכְלָם.
וְאִם אֵין בְּיָדְךָ כְּלוּם מַה לִתֵּן לוֹ, פַּיְסֵהוּ בִּדְבָרִים.
וְאָסוּר לִגְעֹר בֶּעָנִי אוֹ לְהַגְבִּיהַּ קוֹלוֹ עָלָיו בִּצְעָקָה,
מִפְנֵי שֶׁלִּבּוֹ נִשְׁבָּר וְנִדְכֶּה, וַהֲרֵי הוּא אוֹמֵר לֵב
נִשְׁבָּר וְנִדְכֶּה אֱלֹהִים לֹא תִבְזֶה. וְאוֹי לוֹ לְמִי
שֶׁהִכְלִים אֵת הֶעָנִי, אֶלָּא יִהְיֶה לוֹ כְּמוֹ אָב, בֵּין
בְּרַחֲמִים בֵּין בִּדְבָרִים שֶׁנֶּאֱמַר, אָב אָנֹכִי לָאֶבְיוֹנִים.
It is forbidden to turn away a poor person empty handed. You should
always give him something, even if only a dried fig, as it says, "Let
not the oppressed turn back in disgrace." And if you have nothing to
give him, console him with words. It is forbidden to scold a poor
person or to raise your voice to him in a shout, because he is
brokenhearted and humbled, as it is said: "A heart that is broken and
humbled God does not despise." Woe is to him who embarrasses the poor.
Rather act towards him like a father, both in [feelings of] compassion
and with words, as it is said: "I was a father to the poor."
Shulchan Aruch Yoreh Deah 251
מי שבא ואמר האכילוני אין בודקין אחריו אם הוא רמאי אלא מאכילין אותו מיד
היה ערום ובא ואמר כסוני בודקין אחריו אם הוא רמאי ואם מכירין אותו מכסין
אותו מיד: If someone comes and asks for food, we do not investigate to
see if he is lying; rather, we feed him right away. If he needs
clothes and asks for clothing, we investigate to see if he is lying.
But if we know him, he is given clothing right away.
Aruch HaShulchan, Yoreh Deiah, 250:7-8
אבל עניים העוברים דרך העיר והם מערים אחרות ובהם לא שייך שיתנו להם די
מחסורם כמובן יש בהם שיעורים אחרים וכך שנו חכמים במשנה דפאה [פ"ח מ"ז]
אין פוחתין לעני העובר ממקום למקום מככר הנלקח בפונדיון: וזהו בעני פשוט
אבל כשמכירין אותו שהוא מכובד נותנין לפי כבודו ופשוט הוא דזה העני העובר
ממקום למקום נצרך גם לנדבה לפרנסת ביתו או להשיא בתו וכיוצא בזה דנותנין
לו גם נדבות קטנות וכן המנהג. [ערוך השולחן יורה דעה סימן רנ סעיף ז-ח]
The poor passing through town, which live in other cities, and it is
not possible to give them all of their needs, follow other guidelines.
About these our Sages taught in the Mishneh in Peah (8:7), “A
traveling pauper is given at least a loaf worth a pundeyon.” This all
refers to a regular pauper. But if you know the poor person to be
honorable, you should give him according to his honor. Obviously, a
pauper traveling to collect funds to support his family or to marry
off his daughter, and the like, is given small donations in addition
to his basic needs, and this is the accepted custom. [Aruch
Hashulchan, Yoreh Deiah, 250:7-8]
Worth noting:
Vayikra Rabah 34:11
רַבִּי אַבָּהוּ בְּשֵׁם רַבִּי אֱלִיעֶזֶר אָמַר, צְרִיכִין אָנוּ
לְהַחֲזִיק טוֹבָה לָרַמָּאִין שֶׁבָּהֶם, שֶׁאִלּוּלֵי הָרַמָּאִים
שֶׁבָּהֶם כֵּיוָן שֶׁהָיָה אֶחָד מֵהֶם תּוֹבֵעַ בִּידֵי אָדָם וְהוּא
מַחֲזִירוֹ, מִיָּד נֶעֱנַשׁ לְמִיתָה, שֶׁנֶּאֱמַר (דברים טו, ט):
וְקָרָא עָלֶיךָ אֶל ה' וגו', וּכְתִיב (יחזקאל יח, כ): הַנֶּפֶשׁ
הַחֹטֵאת הִיא תָמוּת Rebbi Abahu said in the name of Rebbi Eliezer: We
must be grateful for the swindlers among the [poor], for were it not
for the swindlers among them, then when one of the poor asked for help
from someone and he turned him away, he would immediately be punished
with death, as it says (Devarim 15:9), “He will call out to G-d about
you [and you will (immediately) be punished for your sin].” Likewise,
it says (Yechezkel 18:20), “The sinful soul will die.”