I assume you are buying it from an unreliable source, or there is already some other red flag, since with a shrink-wrapped box from a major onshore retailer the question would be unlikely to arise. It's possible that someone would be able to give better advice if we knew more about this.
The short answer is that you probably won't be able to tell until you physically get it in your hands, so whether you'll be able to see it before paying is am important question. You might be able to learn something about the phone's history from the IMEI. The baseband version is often a good thing to check for fakes: these are usually programmed to lie about most of the hardware and software features, but the baseband version is usually genuine information and fakes never use the real SoC (too expensive) and so this is usually a giveaway.