מִצְוַת פִּדְיוֹן פֶּטֶר חֲמוֹר – לִפְדּוֹת וְלַד חֲמוֹר זָכָר שֶׁנּוֹלַד רִאשׁוֹן, שֶׁנֶּאֱמַר (שמות יג יג) וּפֶטֶר חֲמֹר תִּפְדֶּה בְשֶׂה. וְעִנְיָנָהּ הוּא שֶׁלּוֹקֵחַ הַיִּשְׂרָאֵל שֶׂה אֶחָד וְנוֹתְנוֹ לַכֹּהֵן בְּפִדְיוֹן בְּכוֹר הַחֲמוֹר שֶׁהוּא לַשֵּׁם, מִן הַטַּעַם שֶׁכָּתַבְנוּ לְמַעְלָה, וְהוּא, בָּרוּךְ הוּא, נְתָנוֹ לַכֹּהֵן. וּלְפִיכָךְ פּוֹדֵהוּ הַיִּשְׂרָאֵל מִמֶּנּוּ, כִּי הַשֵּׁם יִתְבָּרַךְ רָצָה שֶׁיִּהְיֶה לוֹ פִּדְיוֹן בְּשֶׂה. וְאִם אֵין לוֹ שֶׂה, פּוֹדֵהוּ בִּדְמֵי שֶׂה. וּלְפִי שֶׁאֵין דְּמֵי הַשֵּׂיוֹת שָׁוִין, אָמְרוּ רז"ל (בכורות יא, א) עַיִן יָפָה בְּסֶלַע, עַיִן רָעָה בַּחֲצִי סֶלַע, וּבֵינוֹנִית בִּשְׁלֹשָׁה זוּזִין. וּזְמַן הַפִּדְיוֹן, עַד שְׁלֹשִׁים יוֹם, וְהַשֶּׂה חֻלִּין בְּיַד כֹּהֵן, וְהַחֲמוֹר בְּיַד יִשְׂרָאֵל. The commandment of the redemption of a [firstborn] donkey: To redeem the male offspring of a donkey that was born first, as it is stated (Exodus 13:13), “And the firstborn of a donkey, you shall redeem with a sheep.” And its content is that the Israelite takes one sheep and gives it to the priest as redemption for the firstborn donkey, which is [holy] to God, for the reason that we wrote above. And He, blessed be He, gave it to the priest. And hence the Israelite redeems it from him, since God, may He be blessed, wanted that there should be a redemption for it with a sheep. And if he does not have a sheep, he redeems it with the money [value] of a sheep. And since the money of sheep is not the same [in all cases], the Rabbis, may their memory be blessed, said (Bekhorot 11a), “A good eye (a generous price) is a sela, a bad eye (a miserly price) is half a sela, an intermediate [one] is three zuz.” And the time of the redemption is until thirty days. And the sheep is non-sanctified in the hand of the priest and the donkey is [likewise] in the hand of the Israelite.
מִשָּׁרְשֵׁי מִצְוָה זוֹ. כְּדֵי שֶׁיִּזְכְּרוּ הַיְּהוּדִים לְעוֹלָם הַנֵּס שֶׁעָשָׂה לָהֶם הָאֵל בִּיצִיאַת מִצְרַיִם, שֶׁהָרַג כָּל בְּכוֹרֵיהֶם שֶׁנִּמְשְׁלוּ לַחֲמוֹרִים, כְּמוֹ שֶׁכָּתוּב. It is from the roots of this commandment [that it is] so that the Jews will always remember the miracle that God did for them during the exodus from Egypt — that He killed all of their firstborn, as it is written.
דִּינֵי הַמִּצְוָה. כְּגוֹן שֻׁתָּפוּת הַנָּכְרִי אוֹ מְקַבֵּל חֲמוֹר מִמֶּנּוּ לְהִטַּפֵּל בּוֹ, וְדִין גּוֹי שֶׁהִפְרִישׁ פֶּטֶר חֲמוֹר מַה דִּינוֹ, וְדִין חֲמוֹר שֶׁיָּלְדָה כְּמִין סוּס, וְדִין לוֹקֵחַ חֲמוֹר מִגּוֹי, וְעִנְיַן סָפֵק אִם בִּכְּרָה מַה דִּינוֹ, וְדִין נוֹתֵן הַחֲמוֹר בְּעַצְמוֹ לַכֹּהֵן, וְיֶתֶר פְּרָטֶיהָ, מְבֹאָרִים בְּמַסֶּכֶת בְּכוֹרוֹת (ה, ב יא, א יב, א) (יו"ד סימן שכ"א). The laws of the commandment — for example, the partnership of a gentile or if he receives a donkey from him to take care of; the law of a gentile who separated out a [firstborn] donkey as to what is its law; the law of a donkey that gave birth to a type of horse; the law of one who buys a donkey from a gentile; what is the law in the matter of a doubt if it already gave birth to a firstborn; the law of one who gives the donkey itself to the priest; and the rest of its details — are [all] elucidated in Tractate Bekhorot. (See Tur, Yoreh Deah 221.)
וְנוֹהֶגֶת בְּכָל מָקוֹם וּבְכָל זְמַן, בִּזְכָרִים וּנְקֵבוֹת יִשְׂרְאֵלִים, וְלֹא בְּכֹהֲנִים וּלְוִיִּם. וְהָעוֹבֵר עַל זֶה בִּטֵּל עֲשֵׂה. And [it] is practiced in all places and at all times by Israelite males and females, but not by priests or Levites. And one who transgresses this violates a positive commandment.