סימן קסד סעיף ג
אֵין פּוֹדִין אֶת הַבְּכוֹר, עַד שֶׁיַעַבְרו עָלָיו שְׁלֹשִׁים יוֹם. וּבְיוֹם שְׁלֹשִׁים וְאֶחָד יִפְדֵּהוּ מִיָּד, שֶׁלֹּא לְהַשְׁהוֹת אֶת הַמִּצְוָה. וְאֵין פּוֹדִין בְּשַׁבָּת וּבְיוֹם טוֹב. אֲבָל בְּחֹל הַמּוֹעֵד פּוֹדִין. נוֹהֲגִין לַעֲשׂוֹת אֶת הַפִּדְיוֹן בַּיּוֹם. וּמִכָּל מָקוֹם אִם עָבַר יוֹם שְׁלֹשִׁים וְאֶחָד וְלֹא פָדָה, אוֹ שֶׁחָל בְּשַׁבָּת אוֹ בְּיוֹם טוֹב אוֹ בְּתַעֲנִית, יֵשׁ לִפְדּוֹתוֹ תֵּכֶף בַּלַיְלָה שֶׁלְּאַחֲרָיו, וְלֹא יַמְתִּינוּ עַד לְמָחָר לְהַשְׁהוֹת הַמִּצְוָה יוֹתֵר.
You cannot redeem the firstborn before he is fully thirty days old, and on the thirty-first day you should redeem him immediately, and not postpone the performance of the mitzvah. You may not redeem him on Shabbos or Yom Tov,2Because it is similar to buying and selling, which is forbidden on Shabbos and Yom Tov. (Shach 305:12, Rivash, Responsa 152) but you may redeem him on Chol Hamoed.3Ramah 305:11. It is customary to do the redemption during the daytime. However, if the thirty-first day has passed, and you have not yet redeemed the infant, or if that day is on Shabbos or Yom Tov or on a fast day, you should redeem him immediately on the following night, and not wait until the next day, thus, further postponing the mitzvah.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)