The Shulchan Aruch · Orach Chayim
אורח חיים ק״זOrach Chayim 107
Siman 107 of 697 in Orach Chayim — 4 se'ifim
הלכות תפילהLaws of Prayer· siman 107
Se’if 1א׳
אִם הוּא מְסֻפָּק אִם הִתְפַּלֵּל, חוֹזֵר וּמִתְפַּלֵּל, וְאֵינוֹ צָרִיךְ לְחַדֵּשׁ שׁוּם דָּבָר; אֲבָל אִם בָּרִי לוֹ שֶׁהִתְפַּלֵּל, אֵינוֹ חוֹזֵר וּמִתְפַּלֵּל בְּלֹא חִדּוּשׁ; וְעַל יְדֵי חִדּוּשׁ, חוֹזֵר וּמִתְפַּלֵּל בִּנְדָבָה כָּל הַפְּעָמִים שֶׁיִּרְצֶה, חוּץ מִתְּפִלַּת מוּסָף שֶׁאֵין מִתְפַּלְּלִים אוֹתָהּ בִּנְדָבָה; וּבְשַׁבָּת וְיוֹם טוֹב, אֵינוֹ מִתְפַּלֵּל תְּפִלַּת נְדָבָה כְּלָל, וְאִם הִתְחִיל לְהִתְפַּלֵּל עַל דַּעַת שֶׁלֹּא הִתְפַּלֵּל, וְנִזְכַּר שֶׁכְּבָר הִתְפַּלֵּל, פּוֹסֵק אֲפִלּוּ בְּאֶמְצַע בְּרָכָה אֲפִלּוּ יָכוֹל לְחַדֵּשׁ בָּהּ דָּבָר.
One Who Is In Doubt If One Prayed, and The Law Regarding a Voluntary [Amidah] Prayer, Containing 4 Se'ifim: If one is in doubt if one prayed [the Amidah], one goes back and prays [the Amidah again], and one does not need to innovate anything new [in the prayer]. But if it clear to one that one prayed, one does not go back and pray [again] without an innovation [i.e. something new added to his prayer]. And by means of [using] an innovation [in one's prayer], one may return and pray as a voluntary [Amidah] as many times as one wants, except for the Musaf prayer [i.e. Amidah], for we do not pray it as a voluntary [Amidah]. And on Shabbat and Yom Tov, one may not pray a voluntary prayer at all. And if one began to pray [the Amidah], under the belief that one did not pray [already], and then [in the middle of one's prayer] remembered that one already prayed [it], one [immediately] stops, even in the middle of a blessing, even if one is able to innovate a new thing into it.
Se’if 2ב׳
חִדּוּשׁ זֶה שֶׁאָמַרְנוּ, הוּא שֶׁיְּחַדֵּשׁ דָּבָר בְּכָל בְּרָכָה מֵהָאֶמְצָעִיּוֹת, מֵעֵין הַבְּרָכָה; וְאִם חִדֵּשׁ אֲפִלּוּ בִּבְרָכָה אַחַת, דַּיּוֹ, כְּדֵי לְהוֹדִיעַ שֶׁהִיא נְדָבָה וְלֹא חוֹבָה. הַגָּה: יֵשׁ אוֹמְרִים דְּלֹא מִקְרֵי חִדּוּשׁ אֶלָּא אִם נִתְחַדֵּשׁ אֶצְלוֹ דָּבָר שֶׁלֹּא הָיָה צָרִיךְ אֵלָיו קֹדֶם לָכֵן, (טוּר בְּשֵׁם הָרֹא"שׁ).
This "innovation" that we mentioned [above means] that one "innovates" something in each blessing of the middle ones [i.e. the middle thirteen blessings of the Amidah] that relates to that [particular] blessing. And if one innovated [something] in even just one [of the middle blessings], that is sufficient in order to indicate that it is a voluntary [prayer] and not an obligatory one. Gloss: And there are those who say that it's not called "an innovation" unless something was added into it that one did not need beforehand. [Tur in the name of the Rosh]
Se’if 3ג׳
אֵין צִבּוּר מִתְפַּלְּלִין תְּפִלַּת נְדָבָה כְּלָל.
A congregation never prays a voluntary prayer.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0