Joseph collected all the money to be found in the land of Egypt and the land of Canaan in exchange for the grain they were buying, and he brought it into Pharaoh’s palace.
Jewish Publication Society of America Version (JPS1917) - Genesis 47:14 >And Joseph gathered up all the money that was found in the land of Egypt, and in the land of Canaan, for the corn which they bought; and Joseph brought the money into Pharaoh's house.