The invention of money led to the end of the barter system. It was a system which was used before the invention of the money. You can read about the Monetary System – Types of Monetary System (Commodity, Commodity-Based, Fiat Money) in the given link.
Further readings: