Image: Reuters
Ask the seller if the iPhone has been repaired before and if the repairs were done by an Apple-authorized service center. Repairs done at places that aren't authorized by Apple might use fake parts. So, it's important to make sure the iPhone doesn't have any fake parts.
Ask the seller to go to Settings, then General, and then About on the iPhone to find its serial number.
Make sure the details of the phone match the official receipt by asking the seller to check the IMEI number.
Ask the seller to give you either a digital or paper copy of the original receipt. The receipt is important because it tells you who owned the phone before and whether it's still under warranty.
If the iPhone you're thinking about buying is a bit old, it might have some signs of use. Ask the seller to send pictures of the phone from every side.