That's the one great thing about conventional NYC cabs....they're required to have a working credit card / debit card payment system at all times.
I can't imagine living in a place without any electronic payment system, especially since I pretty much never carry around cash with me.
That's required almost everywhere. Trust me, I've heard that shit from NY cab drivers before as well.