If you just bought him, don't worry so much about him not eating. 1) as was said before, they can be finicky and 2) some bettas take a while to get used to their new environment/home.
When I bought my first betta, Solomon, about a month ago he wouldn't eat at first. And he definitely didn't like that flake food that came with the 1/2 gallon I got for him. I read up and strolled through message boards like this one to see what's popular.
Now, both of my boys are spoiled rotten. I have 4 different types of food
) that they love:
*HBH Betta Bites -- primary food, vitamin enriched
*Hikari Bio Betta Gold pellets -- primary food, vitamin enriched
*Hikari FD brine shrimp -- treat once or twice a week, has vitamins as well
*Top Fin FD blood worms -- treat usually once, maybe twice a week (they'll eat pretty much any brand blood worms--this was the cheapest, but it's not vitamin fortified so may switch to Hikari brand when this runs out)
Bettas, in a sense, are just like humans. We like variety and our tastes vary from person to person. Just experiment and see what he likes. Make sure he's getting his vitamins and nutrients. Go easy on treats like blood worms and brine shrimp.
And be disciplined in not overfeeding him. They're like little pigs and will eat as long as food's in front of them. But their stomach's only about the size of their eye. Also, fast them for one day a week so they can clean out their system and you reduce chances of constipation. (he might even eat that flake food after you fast him
)
Keep us posted.