How did barrel makers get paid?

Same way as any self-employed tradesmen, or as employees.

Incidentally the proper name for a barrel-maker is "cooper" - another example of a trade whose name has become a surname.