THE DIFFERENT LEVELS OF GIVING TZEDAKAH [Tzedakah: levels]
Gemara
(Mishnah): There was a chamber in the Mikdash called Lishkas Chasha'im. Pious people put money there covertly, and Aniyim from good families took covertly.
Rav Yakov bar Idi and Rav Yitzchak bar Nachman were Gabayim of Tzedakah. They used to give to R. Chama, the father of R. Yehoshua, he would give to Aniyim [who were embarrassed to take from the Gabai].
R. Chinenah bar Papa used to distribute Tzedakah at night. Once, he encountered the head of the [evil] spirits of the night.
The spirit: It says "Lo Sasig Gevul Re'acha"! (The night belongs to us.)
R. Chinena: It says "Matan ba'Seser Yichfeh Af"! (A covert gift overcomes anger.)
The spirit feared him, and fled.
(R. Yonah): It does not say 'Ashrei Nosen l'Dal', rather, "Ashrei Maskil El Dal." This is one who looks at the Mitzvah, [and thinks] how to do it.
When R. Yonah saw an Oni from a prestigious family who lost his wealth, he would say "because I heard that you inherited money from elsewhere, borrow, and you will pay back [later];
When he gave the money, he said "[if you will not receive the inheritance,] it is a gift."
Shabbos 63a (R. Aba): One who lends money is greater than one who gives Tzedakah. Best of all is one who invests.
Bava Basra 10a (R. Chiya bar Aba): Two verses say "u'Tzdakah Tatzil mi'Maves." One Tzedakah saves from a harsh death, and one saves from judgment in Gehinom.
Giving so that he does not know to whom he gives, and the Oni does not know from whom he takes, saves from a harsh death.
To do so, he gives to a pouch of Tzedakah [with an utterly reliable overseer];
(Beraisa - R. Eliezer ben Yakov): One should give a Perutah to the Tzedakah pouch only if the overseer is as trustworthy as R. Chananya ben Tradyon.
(R. Gamliel): Tzedakah elevates Yisrael, but it is a sin for Nochrim, for they give only to be haughty.
151b - R. Chiya (to his wife): When an Oni comes begging, give bread to him quickly, in order that your children will be given quickly.
Kesuvos 67a: Each day, Mar Ukva used to throw four Zuz in the doorway of a certain Oni.
One day, the Oni decided to see who was giving him the money. Mar Ukva [and his wife] fled, and entered an oven.
They went to such extremes [that the Oni not see them], for Mar Zutra bar Tuvya taught that it is better to be cast in a furnace, than to make someone blush.
67b: R. Aba used to wrap coins in a garment and throw them behind himself. He would go where the poor were, and watch that tricksters not take the money for themselves.
Rishonim
Rambam (Hilchos Matanos Aniyim 10:7): There are eight levels of Tzedakah, one above the other. The highest is one who strengthens a faltering Yisrael and gives to him a gift or loan, or makes a partnership with him, or finds a job for him, so he will not need to ask from others. It says "v'Hechezakta Bo Ger v'Soshav va'Chai Imach" - strengthen him so he will not fall and be in need.
Rambam (8): Below this is one who gives to Aniyim, and does not know to whom he gives, and the Oni does not know from whom he takes. This is like Lishkas Chasha'im. Close to this is one who gives to a Tzedakah box. One should give to the box only if he knows that the overseer is trustworthy, and Chacham, and knows to act properly, like R. Chananya ben Tradyon.
Rambam (9): Below this is one who knows to whom he gives, and the Oni does not know from whom he takes. Great Chachamim used to covertly cast money in the doors of Aniyim. It is proper to do so when the overseers of Tzedakah do not act properly.
Rambam (10): Below this is when the Oni knows from whom he gets, but the giver does not know to whom he takes. Great Chachamim used to cast money in back of themselves, and Aniyim came to take, so they would not be embarrassed.
Rambam (11): Below this is when he gives to the hand of the Oni, before he asks.
Rambam (12): Below this is when he gives to him after he asks.
Rambam (13): Below this is when he gives less than is proper with a pleasant face.
Rambam (14): Below this is giving to him sadly.
Tosfos (10a DH v'Eizu): Just the contrary! The great Mitzvah of giving without knowing to whom he gives should save from judgment in Gehinom, which is extremely bad! The Ri says that most matters help a person only after death. Only great Mitzvos have Peros in this world, and the principal is intact for the world to come (Kidushin 39b). This kind of Tzedakah saves even from a harsh death in this world.
Tosfos (10b DH Ela): One should give to a Tzedakah box only if the overseer is as trustworthy as R. Chananya ben Tradyon. He need not be as great a Tzadik as him. The Gabayim in the days of the Amora'im were not as righteous as him (yet Amora'im counseled to give to a box with a proper overseer).
Poskim
Shulchan Aruch (YD 249:6): The highest level of Tzedakah is to strengthen a faltering Yisrael with a gift or loan, or makes a partnership with him, or find a job for him.
Beis Yosef (DH u'Mah): Semag explains that this is the greatest because the Oni is not embarrassed at all, since it is only a loan, partnership or job. Even if it is a gift, he is not embarrassed because he did not yet become a real Oni. Friends often give gifts to each other. In Shabbos 63a, Rashi explains "one who invests" refers to when the giver receives half the profits. It is the best, for there is no embarrassment, since both profit. One is ashamed to take a loan in which the lender does not profit at all. The Rambam did not count this as a separate level above a regular loan.
Gra (8): Toras Kohanim says that one must help him before he falters. This is like a load on a donkey. One can stand him up and lead him. If it falls, five cannot... The Tosefta says that just like there was Lishkas Chasha'im in the Mikdash, so there was in every city. It is better than the Tzedakah box, for no one knew who put there. Regarding the Tzedakah box, the Gabai knows who puts there. It is not as good as Lishkas Chasha'im, but it is close to it.
Shulchan Aruch (7): Below this is one who does not know to whom he gives, and the Oni does not know from whom he takes. Close to this is giving to a Tzedakah box. One should give to a box only if he knows that the overseer is trustworthy, and Chacham, and knows to conduct with it properly.
Beis Yosef (DH u'Mah she'Chasav v'Lo): Tosfos requires an overseer as trustworthy as R. Chananya ben Tradyon, but he need not be as great a Tzadik as him. The Rambam and Tur say that he must be a Chacham. Nowadays we are not so particular about this. Perhaps we hold that he need not be a Chacham in Torah, rather, in matters of being Gabai.
Gra (9): The Sifri expounds "[Titen] Lo" - when no one else is there. This is the source for Lishkas Chasha'im.
Shulchan Aruch (8): Below this is one who knows to whom he gives, and the Oni does not know from whom he takes.
Shulchan Aruch (9): Below this is when the Oni knows from whom he gets, but the giver does not know to whom he takes.
Beis Yosef (DH u'Mah): The Rambam holds that Mar Ukva's practice is better than R. Aba's, for in the latter way, the Oni is slightly embarrassed, but not in the former.
Note: Perhaps even though there is no embarrassment, it is better to give to a Tzedakah box, lest the giver feel greater than the one to whom he gives. Perhaps the Oni who received from Mar Ukva did not feel shame. He merely wanted to know to whom to have gratitude, but Mar Ukva knew that this would embarrass him.
Shulchan Aruch (10): Below this is when he gives to the hand of the Oni, before he asks.
Beis Yosef (DH u'Mah): All of these preferences [through Sa'if 13] are obvious.
Gra (13): He learns from R. Chiya (151b).
Shulchan Aruch (11): Below this is when he gives to him after he asks.
Shulchan Aruch (12): Below this is when he gives less than is proper with a pleasant face.
Shulchan Aruch (13): Below this is giving to him sadly.
Shach (9): I.e. he is pained to give, but does not show anger. If he shows anger, he lost his merit and transgresses "Lo Yera Levavcha."
Gra (16): We find that this is considered Tzedakah. We force people to give!
Rema: One should not aggrandize himself for the Tzedakah he gave. If he does, he is not rewarded for it. Rather, he is punished.
Gra (17): We learn from R. Gamliel [who said so regarding Nochrim].
Rema (ibid.): In any case, one who is Makdish an item for Tzedakah may write his name on it for a remembrance. It is proper to do so.
Taz (4): If he writes his name on it, the Tzibur cannot change it to another purpose.
Gra (18): We find (Bava Basra 133b) that they wrote ['Yosef ben Yo'ezer brought one Keli of coins to Hekdesh...] Rus Rabah (5 DH Amar R. Yitzchak) says that [one should do Mitzvos with a full heart. Had Reuven, Aharon and Bo'az known that their deeds will be written, they would have done them better.] Nowadays when one does a Mitzvah [it is written in front of Hash-m].