...if you're stuck for something to read as well, take a look at this: it's been possible to buy train tickets online for twenty-five years, and 'how it all works' is usually overlooked. Here's a retrospective.
https://www.f17.co.uk/blog/25-years-of-online-rail-retail/forewordI found this bit interesting:
>One of the concepts that took hold in this era [2010-2015] was the concept of making online retail platforms available via APIs - system-to-system interfaces - rather than just via a web front end. >The early uses for these APIs included travel management companies and online travel agencies, who already had booking engines, but simply wanted a pair of interfaces to "get fares" and "book fares". This allowed rail to appear in integrated booking platforms alongside hotel, air and car hire. Later, direct to consumer propositions (such as Loco2, Virgin Trains Ticketing and Uber) would be developed upon these type of APIs, reducing the amount of technical complexity that needed to be recreated.>The GB rail market is relatively unique. In most of the EU, and indeed globally, the national railway provides these APIs. This reduces the complexity of bringing a basic proposition to market, but limits the ability of retailers to innovate as they are constrained by the APIs published by the national railway.>In the GB rail market, however, third parties take the raw data and as a result the provision of APIs for search/booking inventory is a competitive market space with a choice of different API providers available, or the ability for retailers to build their own business logic. Online retailers such as Trainline and RailEasy diversified into providing their platform as a service, with others such as SilverRail being 'pure play' API providers with no real online presence of their own.>Interestingly, many players in the GB market bemoan the overheads of the GB approach, whereas many players in the EU market bemoan the inflexibility of the EU approach.