If you were recently gifted a new iPhone, you may be wondering about the best way to sell your old phone for the best price. (As opposed to trading it in, which could be more convenient, but it also often means you won’t get as much for it.) This guide can help walk you through that process.

Back up your phone

Since you’re going to wipe your phone (you definitely don’t want anyone else getting their hands on your stuff), first, you’ll want to back it up. Make sure you have a current backup of all of your data saved on iCloud, your laptop, or any other local / cloud storage. If iCloud Backup is switched on in your iCloud settings on your phone, and you’ve selected everything you want to back up, it will make it easier to import all of your data into a new phone. You can also back up your phone through iTunes on your laptop and import your data from there.

Wipe your phone

When you’re sure that all of your data is stored, it’s time to wipe your phone. Disable “Find My iPhone” and unpair any devices from your phone, including your Apple Watch. Sign out from your Apple ID and remove the SIM card from the phone. Erase your phone by going into “Settings” > “General.” Tap “Reset” and then select “Erase All Content and Settings.”

Clean it up

Before you even think of selling your phone, you need to make sure it’s looking its best. Remove the case or any stickers, and assess the damage you can see, including scratches or dents, which you’ll have to mention when selling the phone. Then, clean your phone using a screen wipe or screen cleaner. (You might want to leave your screen protector on if it’s in good condition.)

It’s also a good idea to take photos of your phone. You’ll need them for the listing when selling the phone online; in addition, they’re useful in case the recipient reports further damage.

Estimate Your Phone’s Value

A good way to find out how much your phone is worth is to use sales sites such as Swappa, eBay, Craigslist, or the subreddits r/Phoneswap, r/Appleswap, and r/Hardwareswap to see what price other used phones are going for. Adjust your search to filter for phones in the same condition as yours and set your price accordingly.

Sell your phone

There are a variety of places you can sell your phone.

One such site, Swappa, charges a fee from the buyer rather than the seller, depending on the price of the phone. However, Swappa recommends you factor shipping costs into the price you set, as the seller is responsible for paying the shipping company directly.

eBay gives you 50 free listings, depending on the type of listing, but after that, it’ll cost you 35 cents per listing. eBay also charges the seller a percentage of the item’s price. Facebook Marketplace is also an option, or you can join one of the Facebook’s buy / sell groups. Both Facebook Marketplace and Craigslist allow you to post listings for your phone for free.

If you decide to make the transaction in person, it’s safest to meet in a public place, like a cafe

If you decide to do the transaction in person, it’s safest to meet in a public place, like a cafe. Cash is probably the best way to go to avoid Venmo scams or PayPal chargebacks. For added security, The Verge’s Chris Welch has recommended using a counterfeit detector pen to authenticate cash.

Whatever you decide to do with your old phone, just make sure you’re happy with your new phone first. You don’t want to have to return that brand-new phone because of problems (or because you just don’t like it) and suddenly find yourself desperately scrounging around for a temporary substitute.