Welcome to the forum.
We can’t guarantee what the railway will do (they’re within their rights to go straight to court) but the most likely course of events will be that they write to you asking for your side of the story. I cannot advise you to be anything but honest in responding to that letter: in particular there’s no point in now buying a railcard to cover yesterday’s travel in that the railway will notice that the railcard wasn’t valid on the date of journey.
Instead, what you need to do is to convince the railway that you have learnt your lesson, that they will get their money back for the dodged fare, and that you do not need to be taken to court to recognise that you were in the wrong. So when they write to you, write back
- honestly: tell them what you were trying to do
- apologetically: make it clear that you now know it was wrong and that the railway is entitled to the proper fare for a journey
- constructively: be clear that you are prepared to pay the fare that you dodged and the costs of the investigation that the railway will have incurred. Also explain what steps you are taking to avoid the same problem happening again (and for this purpose, if you are entitled to a railcard it may be worth buying one, to show that you are willing to follow the rules)
- briefly: it’s easier for whoever reads your letter to find the important points in a short letter
- courteously: you want whoever reads the letter on your side, and that will be easier if you are nice to them.
The chances are that your first offer to settle will be refused: from what we see here, that’s frequently the case, particularly if the railway employ a firm called Transport Investigations Ltd to carry out the investigation. So carry on asking each time you are in touch - even talking to the prosecutor at the court room door if the case does go to court.
So you might feel that you need a solicitor. As you have found, they are not cheap. But before going down that route, think about what a conviction would mean to you. Obviously it’s not a good thing to have a conviction - but would it cause you problems at work or in getting a job? For most jobs, the answer is ‘no’: fare-dodging once is (as you probably now know) a stupid thing to do - but everyone does stupid things from time to time, and employers know this. As long as you don’t make a habit of it (which would suggest persistent bad judgement) or try to hide your conviction (ditto, and suggests dishonesty) there probably won’t be a problem. Some jobs are tighter than this - but they generally have regulators with websites which explain their rules. So have a look at the website to check the rules if that means you.