Surah As-Saaffaat

37:107

وَفَدَيْنَٰهُ بِذِبْحٍ عَظِيمٍۢ

And We ransomed him with a great sacrifice,

Tafsir 37:107

And I set Ishmael free in exchange for a huge ram which was to be slaughtered instead of him.