China’s metro systems are usually the easiest way for visitors to move around large cities. They are cheap, frequent, air-conditioned, and far more predictable than road traffic. The part that confuses many first-time visitors is not the train map. It is the gate. Locals rarely queue at ticket machines anymore; they open a transit QR code in Alipay or WeChat, scan at entry, scan again at exit, and let the app calculate the distance-based fare.
For tourists, this is now a realistic way to ride in most major cities, but it is not one single national QR code. Beijing, Shanghai, Guangzhou, Shenzhen, Chengdu, Hangzhou, and other cities each have their own local transit code or mini-program inside Alipay and WeChat. You usually activate the code once per city, approve automatic fare deduction, and then scan it at the metro gate just like a local.
This guide explains how China metro QR codes work, how to set them up in Alipay and WeChat, what to expect in six major cities, and when a physical transport card or single-journey ticket is still the better choice.
How China Metro QR Codes Work
A metro QR code is not the same as the payment QR code you show in a shop. In a shop, the merchant scans your payment code and charges a fixed amount. In a metro system, the fare is unknown until the end of the trip because most Chinese metros charge by distance. The app therefore creates a dedicated transit code that identifies your entry station, records your exit station, and charges the final fare after you leave the paid area.
The normal flow is simple:
- Open Alipay or WeChat before you reach the gate.
- Go to the local transport or metro code for the city.
- Let the QR code refresh on your screen.
- Hold the phone flat above the scanner at the entry gate.
- Wait for the beep, green arrow, or gate opening.
- Ride and transfer inside the paid area.
- Scan the same city code again at the exit gate.
The scanner is often a small glass panel on top of the gate or angled toward you. Brightness matters. If the gate does not read your screen, increase brightness, hold the phone steadier, and place it closer to the scanner instead of waving it in the air.
Important: metro QR codes are usually local. A Shanghai Metro code will not automatically become a Beijing Subway code. When you arrive in a new city, switch location in the transport section and activate the right local ride code. The first activation can require a few taps: agreeing to service terms, choosing a payment source, and allowing automatic deduction.
If you want the bigger transport picture, keep the site’s China Transport Guides open as a planning hub. For a city-specific example, the Shanghai Metro guide shows the same gate logic in more detail.
Setting Up Alipay for Metro QR Codes
For most short-term visitors, Alipay is the easiest first app to try. Set it up before your trip if possible, using stable WiFi and the same phone number that can receive SMS codes.
First, install Alipay and register with your mobile number. Complete real-name verification with your passport if prompted. Then add an overseas bank card, preferably Visa or Mastercard. Some other card networks may work depending on issuer and app support, but Visa and Mastercard are the safest assumptions for travel planning.
To activate a metro QR code in Alipay:
- Open Alipay.
- Look for “Transport” on the home screen. If you do not see it, use the search bar and search for “metro”, “transport”, or the city name.
- Confirm the city at the top of the transport page.
- Choose metro, subway, or transit code depending on the city label.
- Agree to the user terms and authorize automatic fare deduction.
- Select your linked card or Alipay balance as the payment source.
- Generate the QR code and keep it ready before approaching the gate.
In some cities, Alipay may show several transport choices: metro, bus, taxi, bike, or intercity rail. Choose the metro or subway code for turnstiles. A bus code may not work at a metro gate.
If activation fails, check three things before assuming the system is broken. First, confirm your passport verification is complete. Second, confirm the card is active for payments in China and not blocked by your bank’s fraud controls. Third, try switching payment method inside Alipay if you added more than one card.
For payment setup beyond metro rides, read Alipay Foreign Credit Card Step by Step and How to Pay in China. Metro QR codes are much easier when the wallet itself has already been tested on a small purchase.
Setting Up WeChat for Metro QR Codes
WeChat Pay can also work well for metro rides, especially if you already use WeChat for messaging, hotel contacts, tour operators, or local mini-programs. The setup is similar in principle but the menus are different.
First, install WeChat, register your account, and open the wallet/payment area. Depending on your app region and account state, this may appear under Me, Services, Wallet, or Pay. Add your foreign card and complete identity verification if required. As with Alipay, do this before you are standing at a busy station gate.
To find the metro QR code:
- Open WeChat.
- Search for “Transit Code”, “Ride Code”, or the Chinese term “chengchema”.
- Select the correct city.
- Enable the local transit service.
- Agree to automatic deduction.
- Choose your linked bank card as the payment method.
- Open the generated code at entry and exit.
WeChat sometimes routes transport through a city-specific mini-program. That is normal. For example, one city may label it as a subway code, another as a ride code, and another as public transport. The key is that the city name and metro function match where you are standing.
If WeChat does not show the service for your current city, try Alipay. If both fail, buy a single-journey ticket for that ride and troubleshoot later at your hotel. Do not spend ten minutes blocking a gate while trying to solve account verification, card authorization, or mini-program permissions.
For a deeper wallet setup, use WeChat Pay Foreign Visitors Guide and Alipay vs WeChat Pay for Foreigners. The best travel setup is having both apps ready, because one can cover the other when a card issuer or mini-program behaves unpredictably.
City Notes: Beijing, Shanghai, Guangzhou, Shenzhen, Chengdu and Hangzhou
China’s largest metro systems feel similar once you are inside: security check, bilingual signs in major stations, numbered lines, color-coded transfers, and distance-based fares. The QR setup, however, is local.
Beijing: Beijing Subway is vast and useful for airports, railway stations, museums, hutong areas, and business districts. In Alipay or WeChat, make sure the city is set to Beijing and activate the subway or public transport ride code. Beijing stations can be busy, and airport/railway stations often have luggage-heavy queues, so open the code before you approach the gate. If your QR setup fails, ticket machines and staffed counters are common.
Shanghai: Shanghai is one of the easiest metro cities for foreign visitors because signage is strong, transfers are logical, and the system connects Pudong Airport, Hongqiao Airport, Hongqiao Railway Station, People’s Square, Lujiazui, the Bund area, and many tourist neighborhoods. Use the local Shanghai transit code in Alipay or WeChat. For detailed station habits, fares, transfers, and airport routes, read the dedicated Shanghai Metro guide.
Guangzhou: Guangzhou Metro is excellent for Canton Tower, Zhujiang New Town, Shamian, Guangzhou South Railway Station, and Baiyun Airport. The city is also connected to the wider Greater Bay Area, so be careful not to confuse local metro codes with intercity rail or neighboring city services. If you are also visiting Shenzhen or Hong Kong, remember that each system has its own payment rules.
Shenzhen: Shenzhen Metro is modern, clean, and useful for tech districts, shopping areas, railway stations, and border crossings toward Hong Kong. Activate the Shenzhen metro or ride code separately even if you just used Guangzhou Metro the day before. At border-area stations, keep extra time for crowds and onward crossing formalities. Shenzhen is mobile-first, so QR codes are usually the smoothest option once set up.
Chengdu: Chengdu Metro is the practical way to reach Tianfu Square, Chunxi Road, major railway stations, pandas, and many food neighborhoods. The app labels can be less familiar to first-time visitors, so search by city name and transport code if the home-screen shortcut is not obvious. Chengdu is a good place to use QR codes because taxi traffic can slow down around nightlife and restaurant zones.
Hangzhou: Hangzhou Metro serves West Lake access points, Hangzhou East Railway Station, Xiaoshan Airport, and many business districts. Because Hangzhou is strongly tied to Alipay’s ecosystem, Alipay is a sensible first choice here. Still, set up WeChat too if you plan to use restaurants, attractions, or local services that rely on WeChat mini-programs.
Physical Transport Card vs QR Code vs Single-Journey Ticket
Most tourists should start with QR codes, but they are not always the best answer for every person or every day.
QR code via Alipay or WeChat is best for most visitors. It avoids ticket-machine lines, calculates the fare automatically, and works well when you ride several times per day. It is ideal for a multi-city trip if you are comfortable switching city codes. The downside is dependence on your phone, app account, card authorization, battery, and mobile data.
A physical transport card is best for longer stays, families, and people who dislike app friction. Many cities sell stored-value cards at service counters. You top up the card, tap in, and tap out. It can be easier for children, older travelers, or anyone whose foreign card keeps failing in wallet apps. The downsides are deposit/refund rules, city-specific compatibility, and the need to manage remaining balance.
A single-journey ticket is best as a backup. Ticket machines usually have an English option in major cities, but not every machine accepts every payment method. Some machines may prefer coins, small RMB notes, or local mobile payment. A single ticket is slower but reliable when your phone is dead, your QR code will not load, or you only need one ride in a city.
For a first trip, use this decision rule: set up Alipay and WeChat before departure, ride with QR codes by default, carry one backup physical card if you stay in one city for a week or more, and keep enough cash for several single-journey tickets.
Network, Battery and Card Problems
The most common tourist question is whether the QR code works without internet. The practical answer is: assume no. Some apps may display a recently loaded code for a short period, but you should not plan a metro journey around offline access. The code may need to refresh for security, the app may need to verify your account, and the fare needs to settle after exit. Use an eSIM, roaming plan, pocket WiFi, or station WiFi so the app can load properly.
Battery is just as important. If your phone dies after entry but before exit, go to the staffed service window near the gates. Staff can help, but the process takes time and you may be charged a maximum fare or need to explain your entry station. A small power bank is not optional if you rely on phone payment all day.
Foreign-card binding usually works better than it used to, but it is not guaranteed. Your bank may decline a wallet authorization, require 3-D Secure confirmation, block overseas usage, or treat repeated small transit charges as suspicious. Add two cards if you can, preferably from different issuers. Tell your bank you are traveling, enable app notifications, and make one small payment after arrival before relying on the metro code.
Also remember that children, seniors, and luggage-heavy travelers may have different gate experiences. Wide gates are available at most larger stations. If you are traveling with a child who does not have their own phone, ask staff whether they need a ticket, can pass with you, or require a separate fare. Local height and age rules vary.
Practical First-Ride Checklist
Before your first metro ride in China, do this at your hotel, airport lounge, or a quiet corner of the station:
- Confirm mobile data works.
- Open Alipay and WeChat.
- Confirm at least one foreign card is linked.
- Activate the local city metro code.
- Set screen brightness high.
- Carry a little RMB cash.
- Know your destination station and exit number.
At the station, pass the security check first. Bags go through an X-ray machine. Liquids may be checked. Then follow the line-color signs to the gates. Scan in, ride, transfer without leaving the paid area, and scan out. If anything fails, step away from the gate and go to the service counter. Staff may not speak much English, but showing your app screen, destination station, and passport usually gets the problem moving.
China’s metro QR codes look intimidating only before the first ride. Once your wallet is verified and the correct city code is active, the routine is fast: open code, scan, ride, scan out. Use QR codes as your default, keep single tickets and cash as your fallback, and treat each new city as a fresh setup rather than assuming one national code will follow you everywhere.
