This usage stemmed from the image of a buffalo on the $5 gold coin, which was in circulation at the time. While the slang wasn't as common for the $1 bill as it was for the $5, the association remained.
So, if someone in the 1920s said, "I'll give you five buffalo," they meant "I'll give you five dollars."