Answered by Borut | Aug. 26, 2024 00:24
Unfortunately, your itinerary is not eligible for any kind of visa free transit scheme because you will obviously have two mainland Chinese destinations in a row i.e. Beijing and after that Shanghai. This is not allowed under 144 hour visa free transit because this is considered a visit to China and not a transit.
You will have to reduce one mainland Chinese destination or alter your flight itinerary to look, for example:
US - Beijing - Taiwan - Shanghai - Japan
It is important to know that the immediate points before and after your mainland Chinese destination have to be in two different countries or eligible territories (eligible territories are Hong Kong, Taiwan and Macau).
If you proceed with your original plan you will have to obtain a Chinese visa in advance.