All Rome city taxis are required by law to have POS machines. This means you SHOULD be able to pay with a credit card. I say should because sometimes you will find these POS machines to mysteriously be out of order. On the other hand, since Covid, many drivers are happy to use a contact-less pay system.