You will have to pay for it.
You have a couple of options.
Send it to Samsung for out of warranty repair, find a local phone repair shop and get a quote
and lastly if the repair to the phone is costly it may be better to just buy a new phone.
Unfortunately it looks like Samsung doesn't do out of warranty work on the S5.
Do you have the T-Mobile cell phone insirains plan? I can't renemrem the name of it off hand but Customer Care should be able to tell you if you have it or not. If you don't and you don't want to get a new sevice. Look for one of those phone repair kiosks in your local mall and see how much rhey will charge you to fix it.