India has somehow regressed when it comes to credit card acceptance, in the decades I have been going (my wife is Indian).
I was recently there and almost 50% of places will tell you either that their card machine is “broken” or that their machine can’t take foreign credit cards.
I suspect they don’t want to pay the card processing fees, now that UPI exists.
In 1 single day, I went to a famous well known sit down restaurant in Mumbai and their card machine “couldn’t connect” so I had to walk to the bank and get cash, and then later that same day I went to a dentist and the same thing, his machine couldn’t take foreign cards, so I had to go back to the ATM.
If you are visiting and don’t want to deal with cash, then I highly recommend getting UPI because many places just don’t take card anymore.