This is quite common - if you are feeding something different from the shop it can take a while for the betta to realise that what you are putting in the tank is food. Continue feeding the pellets, but only 2 or 3, and remove them if they are not eaten. The betta will not starve himself, he will eventually realise that the pellets are food and eat them.
I have had bettas that won't eat soggy pellets and I've had bettas that will only eat soggy pellets. The ones that prefer soggy pellets spit the pellets out and re-eat them. If yours is doing this, I suggest you soak them in a bit of tank water before putting them in the tank.