For the first time user with foreign passport, you need to goto the counter and get ur ID verified. After that you can purchase ticket using app.
Ticketing FAQ 12. How does passenger "to be verified" with foreign passports in the My Passengers List pick up paper ticket?
After buying tickets for a passenger "to be verified" with foreign passports in the My Passengers List on
12306.n, you need to take the valid original passport used to buy the ticket to the ticket counter at the station for ID verification. When the status has been changed to "ready to be verified," you can pick up the paper ticket.

Originally Posted by flameproof:
Update: So I entered two 回鄉證 as a test, both with their +852 mobile number and both got an instant verification.
For my passport I got a phone number verification (I used my China number), but the document verification has still a read flag and there is something like "need to go to the trains station to get it verified".
Any passport holder knows if that is normal way? And I wonder if that can be done in Hong Kong? Or how do do in China? Just go to a ticket counter or how?