The vast majority of Bitcoin ATMs accept only cash as payment for Bitcoin (due to chargeback issues). You will not be able to pay with your credit card at a Bitcoin ATM.