When I arrived in Bayonne the first time, due to a train strike, there was no service to SJPP. Fortunately, a number of us on the train were in the situation. Four of us shared a taxi to SJPP. Although more expensive than a train ticket, the cost was still in the “reasonable”
range as the cost of the ride was split four ways.
If that isn’t a possibility for you, I’d suggest spending the night in Bayonne and then catching the first train out in the morning. Bayonne is a wonderful French town and depending on how long you traveled to get to that point, it would be a good place to rest up a bit before your Camino. After a morning arrival in SJPP, you could easily get your credencial at the Pilgrim’s Office.
Check out the SNCF website for a timetable of trains from Bayonne-SJPP.