It doesn't matter if the transaction is going down online or face to face, always be sure to know just about everything there is about the person that you are going to be buying a weapon from. In many cases, you might already know the fellow, but not in all cases.
ONLINE: The internet is full of marketplaces where a prospective gun buyer can visit if he or she wants to get a weapon. However, shopping via this medium for a used gun means you will not be able to check what you are buying physically. Meaning, you will only have pictures and descriptions to go on and need to put some faith in the buyer and trust that you won't be scammed.
First things first, you'll need to research on the online marketplace itself because there are some disreputable places on the internet and a little search will reveal them to you. Afterwards, check out the history of the person you are buying from and the previous transactions they've been involved in. They might have ratings and reviews as well which talk about how working with them was amongst other things, make sure you go through all that. All this is to make sure when you make your decision, it will be an informed one.