If you are traveling to a third country and need to stop in China for less than 24 hours, you do not need a visa as long as you do not leave the airport. Some countries such as Spain and Argentina have permission to extend this period for 72 hours and be able to go out to visit the country. You have all the information in: «Tips, documentation and requirements to travel to China«.
You have all the information in: "Tips, documentation and requirements to travel to China".