Positive commandment · Mitzvat Aseh #81 of 613
To redeem a firstling donkey
לפדות פטר חמור
The verse · Shemot 34:20
וּפֶטֶר חֲמוֹר תִּפְדֶּה בְשֶׂה וְאִם־לֹא תִפְדֶּה וַעֲרַפְתּוֹ כֹּל בְּכוֹר בָּנֶיךָ תִּפְדֶּה וְלֹא־יֵרָאוּ פָנַי רֵיקָם
“But the firstling of an ass thou shalt redeem with a lamb: and if thou redeem it not, then shalt thou break its neck. All the firstborn of thy sons thou shalt redeem. And none shall appear before me empty.”
The Rambam’s words
To redeem a firstling donkey, as [Exodus 34:20] states: "Redeem a firstling donkey with a sheep."
לפדות פטר חמור, שנאמר: "ופטר חמור תפדה בשה" (שמות לד,כ).
Why · Sefer HaChinuch #22
Redemption of a firstborn donkey
“It is from the roots of this commandment [that it is] so that the Jews will always remember the miracle that G-d did for them during the exodus from Egypt — that He killed all of their firstborn, as it is written.”
Who & when
“And [it] is practiced in all places and at all times by Israelite males and females, but not by priests or Levites.”
Where in the Mishneh Torah
Hilchot First Fruits and other Gifts to Priests Outside the Sanctuary הלכות ביכורים ושאר מתנות כהונה שבגבולין