If you have a backup to either iTunes or iCloud you will be able to restore from that when setting up the new phone which will reproduce all the apps, settings, messages etc etc on the new device. You may want to run the backup manually one final time before setting the new phone up to make the backup as current as possible.
As far as wiping goes just go to settings/general/reset/erase all content and settings. You will need to enter your appleID and password before it will wipe to remove activation lock. Once erased it should be as new ready for your buyer