This is critical; Apple cannot accept devices with Activation Lock enabled.
Go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings .
Use a paper clip or SIM tool to remove your physical SIM card. The Trade-In Process
Go to Settings > [Name] and tap Sign Out .