If you bought it directly from Apple you have 14 days (28 in some countries) to return it, no questions asked and get a full refund. Does not matter if you already started using it and it has your info.
If you bought it from somewhere else that is not Apple, then their return and refund policies would apply.
Either way, follow the steps in the following support document, to wipe the iPhone clean before returning it.
What to do before you sell or give away your iPhone, iPad, or iPod touch - Apple Support