When I first found out, I lost it. I felt like a pioneer tapping my boat into new land. “Did you know about this?” I asked my expat friends. They didn’t. Nobody did. Everybody should.

Granted, the information about China’s free transit visa came to me secondhand, through my friend Brennan, who had visited while I was living in South Korea. He used it while travelling from West Africa, where Ethiopian Airlines kept him from boarding his flight. “No visa, no flight,” they told him. Even they didn’t know about it.

The People’s Republic of China allows tourists from 53 countries (Canada and the US included) to transit through 18 of their airports for as few as two days, and as many as six, depending on the location. It is a loophole for an otherwise 10-year, $150–200 document. This transit visa is free, great and unbelievably ambiguous. So elusive that, when I called officials to confirm these facts to avoid a travel mishaps, four different Chinese embassies in three different countries (China, the US and South Korea) all claimed ignorance, weren’t qualified to answer, or redirected the call to a number that rings infinitely.

There’s an embassy website, but it lacks clarity and details for a policy that, like its country, mandates very specific rules and regulations.

Relying on yahoo answers, a few blog posts and the grace of God, I intentionally booked layovers through China three separate times, to three separate airports—Beijing, Xiamen and Kunming—where I’ve taken advantage of the transit visa (which frighteningly requires no pre-application; just bring a copy of your outbound flight and follow the signs).

And so, in the same way people pass on good recipes they’ve made, I offer you this: the free pass to China. Tried, tested and true.

You Need a Third Country for this Visa

To qualify for China’s transit visa, it’s necessary to travel to a third country. This means not a round trip with China in the middle.

Seoul – Xiamen – Seoul can’t and won’t happen. Seoul – Xiamen – Manila – Seoul, however, is how I made my first trip to China possible.

If you want to return to your original country (and I’m assuming you do), you must tack on another destination outside of China, which validates the “transit” nature of this visa. It’s a two-prong trip, meant as a hack to utilize layovers and extend a vacation while seeing a new place.

What is Considered a “Third Country”?

I spent roughly 24 hours contacting embassies to navigate this one, and still wasn’t 100 percent I wasn’t breaking the rules until Chinese authorities stamped my visa.

Hong Kong, a special administrative region (along with Macau), and Taiwan, an autonomous region, both fit the bill for third countries. Which is advantageous, because flights on budget airlines from mainland China to these destinations are the cheapest.

When I wanted to hike the Great Wall, I made Beijing my main trip for 72 hours, travelling to Hong Kong as sort of an afterthought. Just remember that whatever city you fly into is the city you must fly out of: China’s transit visa bans you from travelling outside of designated limits in most places.

The Chinese Transit Visa Changes Depending on Your Arrival City

How the time is counted depends on the city you fly into. Excluding Beijing, every other airport doesn’t begin counting on-the-ground visa time until midnight following the day of arrival, which can sometimes allow you a whole extra day, if you’ve book a morning flight.

Beijing Capital International Airport, however, starts counting the visa from the scheduled arrival time of your flight. If you want to maximize your time and don’t care about the city, Shanghai is exceptionally generous with their transit time, allowing 144 hours—six full days.

Similarly, if you have a multiple-layover flight within China, make sure each airport you land in hosts the transit visa policy. This is important because, since China is so huge, often flights (especially within Asia) will have multiple layovers at different Chinese airports. I fell prey to this when travelling from Seoul to Manila, even though I already knew the policy. I overlooked the dual layover and booked the cheapest flight, without realizing that one of the airports did not support transit visas. An expensive mistake.

When, like Brennan, a Chinese airline didn’t let me board my flight because I didn’t have a hotel booked (which isn’t a national policy, I later learned, but rather a rule specific to certain Chinese airlines), I suddenly knew no other words than profanities.

Though it is frustrating not to have all the information, nor an English-speaking help line, nor professionals who are experienced with this very niche subject, the very things for which I’ve cursed China are simultaneously the entire appeal of a country that was almost wholly closed off to foreigners until the ’70s. In many ways, the country is still unequipped to deal with them.

Though China now welcomes tens of millions of foreign visitors annually, and is home to more than a billion people, whenever I visit, it feels like uncharted territory. Like a pioneer tapping a boat into new land, where Facebook and Instagram remain banned by the government. Where alligators chopped in thirds are sold, still moving, at the local market. Where the Great Wall stretches like a dinosaur’s back as far as your eyes can see, then farther. Where, on each flight you take, an intercom announcement will continuously warn you that Chinese aviation law bans all electronics from being powered on (even in-flight mode) onboard, and any violation is punishable by five years’ imprisonment. Where you repeatedly think: So this is China.