There are four badge vending machines to find:
Two additional vendors are worth knowing about once you have finished the story: Cyrus on Nessa and Wakaba on Kollin both sell badges. If you are hunting a specific badge, check these two before backtracking through the machines.