Don't hand over any money until you have verified it is working and not locked to the previous owner's account.
Make sure the iPhone is at the "Hello" screen when you turn it on. Do it there in front of the seller.

If it turns on to the Home Screen with all the apps, don't pay them, until they have followed the steps in the support document linked below and it has been correctly erased.
click here ➜ What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support
Also, make sure after the hello screen, and having connected it to a Wi-Fi network, it does not show the Activation Lock screen.
click here ➜ Activation Lock for iPhone and iPad - Apple Support