If you're leaving Japan, better take out your wallet. The Japanese Parliament, the Diet, has passed what Channel NewsAsia calls the "sayonara tax," a required fee to leave the country.

As Condé Nast Traveler reports, the tax will cost about $9 (¥1000), and will apply to any traveler leaving Japan by plane or ship—whether they're tourists leaving the country or Japanese residents going on vacation. Children under age 2 get a freebie, as does anyone who is just in Japan for a quick layover and is leaving the country within 24 hours of arrival.

The money—an estimated ¥43 billion a year—will go towards improving Japan's tourism infrastructure. That includes adding facial recognition gates at airports, paying for things like multilingual guides at national tourist sites, and promoting Japanese travel around the world. Singapore's Straits Times reports that part of the revenue will also go to expanding free public Wi-Fi and electronic payment systems on public transit.

Japan isn't the first country to impose a departure tax on people leaving the country, but it's often rolled into your airfare, so you might not notice. Many of them are a lot more expensive than Japan's, too. Australia charges around $46, while the UK's tax varies based on the type of plane, number of passengers, and distance flown—and can be from $18 to $670 for long flights.

Tokyo is hosting the Olympics in 2020, which could lead to a huge revenue increase when millions of tourists descend upon the city to watch the Games. Parliament specifically limited the use of the new tax to tourism-related projects, though, so the money can't be used elsewhere in the government budget—just to that sweet, sweet public-bus Wi-Fi.

[h/t Condé Nast Traveler]