Hey TF,
Congrats on your betta, I (obviously) love them.
Young bettas and barbs might get along for a while, but barbs often nip (very common) and the betta will get aggresive as he gets older. Short term, you should be fine (like a few weeks), but plan on seperating the betta, they much prefer their own space.
A 3 gal is a good tank for a young male, but if you can afford a 5 gallon glass tank, it would be better for the betta long term, plus its easier to filter and heat if need be.
Careful, betta's are addictive