http://www.apple.com/legal/sales_policies/retail_us.html - Returns in the USA: All items within 14 days.
https://www.apple.com/iphone/trade-up/ - "Just trade in your eligible smartphone, and then use the credit to lower the full cost of a new iPhone or to reduce the monthly payments with your carrier." Not available in all countries. UK program: https://www.apple.com/uk/shop/iphone/iphone-upgrade-program
Alternatively you can sell it as used and see if you get more money that way.
What to do before selling or giving away your iPhone, iPad, or iPod touch - https://support.apple.com/HT201351 - "Use these steps to remove your personal information from a device, even if you don't have it anymore."