Taxis usually accept the payment of the fare by credit card, but it's better to ask the driver before you get in. You usually get a receipt at the end of the ride. If you don't speak Portuguese, have your address written down and ready to show the driver.