Open Alipay → Transport , check that the city at the top is the city you are standing in, and activate the Metro or Bus code for it. That is the whole system. You scan the code at the gate, and on the metro you scan it again on the way out. Buy it once, in your hotel, on wifi — not at the barrier with a queue behind you.
Setting the code up
In Alipay, the Transport tile is on the home screen — a small bus or train icon. If you cannot see it, type "Transport" in the search bar. Once you are in, look at the top left: it names a city. That is the thing to check every single time, because the code belongs to a city, not to you.
Tap the city name to change it, then choose Metro or Bus and activate that city's card. You will be asked to agree to the terms and enter your six-digit payment PIN; after that the code appears and stays. Each new city needs its own activation the first time — one minute's work — and Alipay keeps them all, so you can switch back with a tap under the code rather than setting anything up again.
Riding the metro
Scan at the entry gate, walk through, and scan the same code again when you leave. Metro fares are distance-based, so the system cannot know what to charge you until it knows where you got off. Forgetting to scan out is the classic beginner mistake: the gate will not open, and the staff at the service window will help you sort it out, but you will have held up a train-load of people to do it.
Before you touch the scanner, make sure you are in the Transport screen and not on your ordinary shop payment code. A payment QR and a transit QR look similar and are not interchangeable; the scanner will simply reject you. If the code refuses to generate, buy a single-journey ticket from the machine or the staffed window instead — every station has both, and the machines have an English option.
Riding the bus
Buses are cheaper and reach places the metro does not, but they are less forgiving for a first-timer: stops are not always announced in English, and you need to know your stop before it arrives rather than reading the sign as you pull in. The fix is to run the route in Amap on your phone and watch your own dot move towards the stop. Board at the front door and scan the QR at the reader by the driver. In some cities with distance-based fares you scan again when you get off; if the reader by the rear door is live when you leave, scan it.
Practical things nobody tells you
Everything is screened. Metro stations put your bag through an X-ray and you through a detector, like an airport but quicker. Budget two to five minutes at busy stations, and do not bring the things you would not fly with — this is not the place to find out.
Peak hours are real. Roughly 7:30–9:30 and 17:30–19:30, especially in Beijing, Shanghai and Chengdu. If you are moving with luggage, go either side of it.
Know the last train. Most systems stop around 22:30–23:00, and the times are posted at the gate. In a city where you do not read the language, that poster is worth a photo on your first evening.
Names come in two scripts. Station signs carry pinyin and characters, and announcements run in English in the big cities. Match both — the spelling on your map app and the characters on the platform are the two halves of knowing you are in the right place.
Questions I get on this one
What does it cost?
Do I need a Chinese phone number for the transit code?
Can I just tap my own bank card?
What if my phone dies?
Is it safe at night?
From riding these systems constantly with guests. Interfaces and city coverage change — if a button has moved since I wrote this, tell me and I will fix it. Related: taxis and DiDi · high-speed trains · all the apps · all essentials