From Hakim bin Hizam, that the Messenger of Allah ﷺ sent Hakim bin Hizam with a Dinar to buy an animal for Udhiyyah (an animal for sacrifice) for him. He purchases an Udhiyyah which he sold and profited a Dinar from, so he purchased another in its place. And he returned to the Messenger of Allah ﷺ with Udhiyyah and the Dinar, so he said: 'The sheep is for sacrifice and Dinar is for charity.'"
أَنَّ رَسُولَ اللَّهِ ﷺ بَعَثَ حَكِيمَ بْنَ حِزَامٍ يَشْتَرِي لَهُ أُضْحِيَّةً بِدِينَارٍ فَاشْتَرَى أُضْحِيَّةً فَأُرْبِحَ فِيهَا دِينَارًا فَاشْتَرَى أُخْرَى مَكَانَهَا فَجَاءَ بِالأُضْحِيَّةِ وَالدِّينَارِ إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَ ضَحِّ بِالشَّاةِ وَتَصَدَّقْ بِالدِّينَارِ