Do I need a hotel reservation to transit Shanghai visa-free?
english.shanghai.gov.cn
Q: Is a hotel reservation mandatory for US passport holders making a visa-free transit through Shanghai, in addition to meeting other requirements?
A: For visa-free transit, please ensure that you carry a valid international travel document and a confirmed onward ticket with a fixed date and seat to a third country or region, or other relevant supporting documents.
You will also need to complete the Arrival Card for Temporary Entry Foreigners and undergo inspection by the border inspection authority upon arrival.
Source: Shanghai General Station of Immigration Inspection