Credit came before barter and coinage
The textbook story that money arose to solve the inefficiency of barter has no ethnographic evidence behind it; no society has been found whose economy ran on barter among neighbors. Records from Mesopotamia show that credit accounting, meaning temple and palace ledgers that tracked obligations in units like silver or barley, came first. Barter shows up mainly between strangers or after a monetary system has broken down, and coins arrived thousands of years later.