The agreement known as barter consisted of swapping one product for another of equal or greater value.
As an example, we could swap one kilogramme of Apple for two kilogrammes of Potatoes. There was no exchange of monetary value.
This system had a few of flaws, the first of which was that there was no standard unit of measurement for the worth of commodities, and the second was that it was difficult to make exchanges.
The use of the barter system was eventually phased out as it was replaced by the circulation of coins and paper currency.