You don’t pay for the badge directly. You do pay for your BSA membership, and you may have materials you need to purchase – some materials you can get for free from some retailers.
I mean, you can technically buy them. It just wouldn't count for anything since a scout leader still has to sign off on whether or not the scout earned the badge.