There are three main paths: (1) use Alipay's transport feature, (2) use WeChat Pay's transport QR, or (3) buy a single-ride ticket with cash. Let's compare them.
Option 1: Alipay Transport QR
This is the most reliable method. You need a working Alipay account with a foreign card linked and verified. Open Alipay, go to the "Transport" section (top of the home screen), select "Shanghai" as the city, and get the metro QR code. Scan this code at the ticket gate. The payment is charged to your linked foreign card. This works with Visa, Mastercard, and JCB.
Option 2: WeChat Pay Transport QR
Similar to Alipay, but must be set up in the "Services" -> "Transport" menu. The catch: WeChat Pay's foreign card acceptance can be more flaky. Some users report success, others see repeated failures. It is a backup, not a primary.
Option 3: Cash Ticket from Vending Machine
Every metro station has vending machines that accept small bills (¥1, ¥5, ¥10) and coins. You select your destination, pay, and collect a paper ticket. This works 100% but requires cash. Not every machine accepts foreign cards, so this is the fallback when apps fail.
Comparison Table (summary)
| Method | Requires | Success Rate | Foreign Card Needed | Notes |
|--------|----------|--------------|--------------------|-------|
| Alipay Transport | Alipay app + linked foreign card | Very high | Yes (linked) | Best for most travelers |
| WeChat Pay Transport | WeChat Pay app + linked foreign card | Medium | Yes (linked) | Inconsistent; use as backup |
| Cash Ticket | Cash (RMB) | 100% | No | Guaranteed, but carries risk of no change |