Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

How does the system know that the ticket was already used?

The thing with plane and long-distance train tickets is that you buy them for a specific route. So all the checking only needs to be done at your departure station/airport, the code for which is encoded in the ticket, and the rest of the system doesn't need to know anything about it. But you can't do that with city transport. When there aren't multi-use tickets, people would often buy multiple single-use ones at a time and use them as the need arises, without knowing in advance when, where, and from where they'll be going.



sort by: page size:

The QR code can encode (or the system can track, or both) any combination of origin, destination, expiration (or purchase time + validity period), ticket number, etc. Check with the local server that the ID exists with the given information and that the ticket isn't expired, then allow the user through, and the server marks that ticket number as used. If the origin doesn't match the current station, the ticket is expired, or the ticket is used, don't let the user in.

But that's a train that goes outside of the city or between cities. You usually buy a ticket specifically for the route you're taking so no system-wide synchronization is necessary, only the origin station needs to know that you've used that ticket.

Fair enough. I went through qr code of my previous metro ticket to see what info they encode. It is non standard so there were - some hashes - type of ticket, in my case single use, - time of issue, - valid upto time, approx 10hrs, approx journey time was only 30 min - ticket id - I could not directly see source/destination address, but it is my hunch that atleast the destination address is encoded

Now this one time ticket needs to generated before entering the metro station and the qr code is scanned at * both entry and exit*.

I think the entire system works on daily rotating ticket id validated using unique hashes where a ticket validity period is tracked. I think this should be enough to ensure non-reuse of same ticket.

The caveat is, I have always only bough one time ticket which is the only mode allowed in qr. For daily traveller's, they need to buy token/card which is NFC based.


Yes, but, for the tourists who dont know, they dont actually check you used a ticket every trip ;)

Source: just came back from a week long trip to Berlin and I still have 2/4 tickets unused.


Centralized ticket server. QR tickets consist of a counter and signature.

Train companies have a login to the ticket server to let them mint tickets.

Checkers, when offline just check the signature, and log to the central server later.

When online, they ask the central server for all other ticket details and check those.

Any ticket that is misused and isn't detected at the time is blacklisted, and that blacklist distributed for offline use. A blacklist of the 10 million most-misused tickets could perhaps be just 10 megabytes - easy to download/update every few hours over mobile internet.

Now, anyone can wrongly use a ticket just once, as long as they are sure the checker is offline. And if they are mistaken and the checker is online, or they reuse a ticket, they will get caught.

main benefit: tickets can be smaller (and therefore read far quicker). Tickets can also be cancelled easily. For example, train companies could send out promotional tickets which only charge you if used, and are cancelled otherwise.


I assume they will know if you don't use a plane ticket that they know you bought, but the idea is that by the time they could know that you are already in a different place?

That is pretty clever. I wonder if tickets with less verification could be even more effective (for example, two bus tickets; one with cash and one with credit for a day later.) Might buy you more time, but the lower ticket price might also make it less convincing.


FWIW, even in places like Estonia, which has a free public transport (bus only?) system, the tickets are still sold/used/checked. Reportedly to get usage numbers and to cost-optimize the routes.

Each resident/citizen can buy a public transport card, then tie it to their Gov ID and then tap it everywhere. You could argue that this could be replaced by some vision tech but I guess this is simpler and has dual use (visitors can purchase the card and pay instead of using for free).


That ticket inspector can also turn a blind eye to invalid tickets (apply their own discretion/favours/whatever), while they'll probably need to follow the official policy with an app-based ticket scan.

From the article, it seems unlikely that a data connection is required to validate a ticket, except to prevent the same ticket being shown twice to different inspectors within a short timeframe.


like public "city" transportation or regional trains?

in regional trains you get checked more often (longer distances, less passenger exchange and per-train personal have this as a side effect), but already it's somewhat tricky to have a regional train ticket which is not linked to your name

in public "city" transportation it's semi-random but also there are times & stations where statistically it's most likely to find someone without an ticket and in turn this places/times get checked very frequent and if you are there every day at the specific time-frames you are unlucky and also get checked very frequent. But most times and place combinations do not have this issue and some are close to guaranteed that you don't get checked.


Yeah not sure what he means. In Germany you can buy a train ticket using the app, show the QR code to the ticket inspector and he scans it. Done.

But there still needs to be some sort of validator that you need to use, doesn't it? I've been to two cities with a similar system where you're trusted, Helsinki and Berlin. In Helsinki there are validators that people tap some kind of multiple-trip card on. In Berlin there are very analog paper tickets that you have to put into a "Drucker" on the platform, it stamps it with the date, time, and station name.

I don't entirely understand why you need tickets for a particular train at a particular time.

Here (Israel) you get to a station, open an app that finds which station you're at and gives you an entry ticket (a QR code), you scan that ticket at the gate on the way to the platforms, and take whatever train(s) you want, and when you're at your destination station you use the app again, which creates an exit ticket and charges you according to the entry and exit stations


Observation: China, a few years back. The train system has been going from a paper ticket approach to a ID-based approach. (You've had to show ID to buy the paper tickets anyway.) They also work on a system where you scan your ticket upon leaving, also--it catches someone who rides further than they paid for.

At the time some cities were fully converted and were willing to accept (with some difficulty, the scanners were picky!) our passports others only had the local ID readers. (The local ID has embedded RFID, you just touch it to the scanner plate and the gate opens.) However, others were not--a couple of times security simply let us out without doing any sort of check.


Your deets are going in a little database every time you buy a train ticket.

How does that work with paper tickets then? Couldn't you do the same thing of buying a cheap ticket then stepping onto an expensive train? Or is there paper ticket infra that's rolled out everywhere to prevent this?

What exactly is the deterance?

Is there a person or machine who physically inspects the ticket before you board each train? Or is it that the person who sold you the ticket is probably going to be able see if you physically go to the wrong train for the ticket you just bought and yell if you go to the wrong one? Or is it that for most folks, the act of talking to a physical person keeps them honest even if they could lie and buy a cheap ticket but board an expensive train? Or something else?


> Does a paper ticket do anything to prevent this?

Ticket inspectors used to mark the tickets so they'd know if someone was reusing a ticket. Originally it would be clipped, then date stamped, and towards the end on South West Trains it was a scribble of biro (or black marker if you were unlucky).

On the occasional trips I take I now use an e-ticket. I have never had the QR(ish) code on it scanned for validity.


You might have to switch to, say, a JR train line. But that’s not a function of the paper tickets. Just different lines. Honestly the much crazier thing is that some trains go over tracks of different companies because they simply cooperate for the benefit of the consumer. You mostly don’t need to know whose line it is ever. The niche exception is for tourists with a JR Pass.

They manage to check the tickets for all those passengers.

I've seen it in action.

next

Legal | privacy