Buying iphone connected to a carrier for wifi
You need to be sure the iPhone is not blacklisted.

You can use Verizon site:

http://www.verizonwireless.com/b2c/nso/enterDeviceId.do

Depending on the iPhone model (CDMA or GSM) you need to enter MEID or IMEI code.