Yeah, it's in the app.
> Paying before just isn't always practical, but I understand that such limitations are often a non-issue for locals.
That's how it works. Typical here for local trains: there are no barriers in train and bus stations. One can just enter the train and bus without any ticket check. But you have to make sure that you have a ticket. The local trains have no installation to buy a ticket anymore. Typically one would buy them online or have a subscription ticket. How does the system make sure that people pay and don't game the system? There are random checks.
If you want a ticket, buy it before entering a train. Train stations have either ticket systems or a ticket office. But most people by now do it online either per website or app.
For long-distance trains I would always book in advance (it's often also cheaper) and book a seat, too.