To thank a taxi driver in Japan, the standard and most polite phrase is "Arigato gozaimashita" (thank you for what you have done). Since the service has concluded, using the past tense "mashita" is more appropriate than the present "masu." For a slightly more casual but still respectful touch, you can simply say "Domo" or "Domo arigato" as you exit. It is also customary to give a slight bow or a polite nod of the head. Remember that Japanese taxi doors are automated and operated by the driver, so you should never try to close the door yourself; simply say your thanks and step away. Tipping is not practiced in Japan and can lead to confusion or the driver following you to return the "lost" money. A sincere verbal thanks and a respectful demeanor are the highest forms of appreciation you can show for the driver's professional service.