Buying a ticket from Madrid to Leon (where we'll begin) was a nightmare online. I tried at least a dozen times but each time got an "error" message after I put in my payment information. Even calling my credit card company and bank (Santander) didn't make a difference. Finally, my son tried to make the reservation using his credit card (which has an additional layer of security called Visa Verified) and Voila! it worked. So, if you are having trouble with the system (see TripAdvisor.com for a lengthy explanation of how to deal with the renfe.com site), try another credit card and/or check to see that your credit card has additional security. It's well worth it: the price is 26.10 Euros vs. 43.70 if purchased in Spain or by phone.