The maker of Scottish soft drink Irn Bru will pay an intial £16.5 million to Funkin's founding shareholders, plus up to a further £4.5 million depending on financial performance targets.
Funkin offers a range of syrups, purees and cocktail mixers and has listings across the off-trade.
Its chief executive, Andrew King, will remain with the business under Barr's ownership and Funkin will operate within the Barr group as a “supported, yet standalone, business unit”.
Roger White, chief executive of AG Barr, said: “We believe that Funkin has created a unique niche in a growing market and together we can drive exciting growth in a new sub category.
“We have a proven track record of acquiring and developing high growth brands such as Rubicon.
“Under our ownership we believe Funkin is even more strongly positioned to take advantage of a number of exciting growth opportunities.”