If the warranty has expired you have to pay for it unless it is one of the rare cases where there is a service bulletin. The other exception is if you have AppleCare (which is a modified warranty in extended form).
Apple Service Programs - Apple Support
Get Apple to look at it:
How to make a Genius Bar appointment
1. Go to Genius Bar Reservation and Apple Support Options - Apple
2. Go to "Get hardware help".
3. Select your hardware and continue selecting options requiring replacing parts until you see "Bring in for Repair"
4. Sign in with your Apple ID
or:
Refer to this document for ways to contact Apple ➞ Choose your country or region - Official Apple Support
Select your country (also look for "other" regions), then a product. If you don't see one that handles your issue then keep experimenting with selections until you reach one that gets you a chat session or a telephone call and get the representative to redirect you.
or:
Contact Apple for support and service by telephone ➞ Contact Apple for support and service - Apple Support
For the iPhone Service Answer Center click here --> Choose Your Country or Region - Apple Support
Select your country.
For a cost estimate:
- Scroll down to "Get an estimate"
- Enter the service required
- Enter the iPhone model you have
- Enter the version of that model
- Click "Get estimate"
For instructions on how to get your iPhone, iPad, or iPod touch ready for service click here --> Prepare your iPhone or iPad for service - Apple Support
- "To protect your information and save time, follow these steps before you get service for your device."