You’re ready to trade in your iPhone for the newest model, but how do you find the best deal? The trade-in options can seem overwhelming; plus, with all those options, the assumption is that you own your iPhone outright–the situation is completely different if you’re leasing the Apple device from your cell carrier. Find out how to turn that aging iPhone into cash, credit, gift cards, or a discount on the latest model.

SEE: Mobile device computing policy (Tech Pro Research)

Are you leasing your iPhone from a cell carrier?

Before you decide how to sell your iPhone, there’s one important variable to account for: Ownership. Most major cell carriers offer a leasing option for iPhones and other pricey mobile devices, and if you’re leasing yours, there’s only one option for you: Trade it in for an upgrade.

Trade-in options vary from contract to contract, so the best way to figure out your particular circumstances is to call your provider or stop in to one of their brick-and-mortar stores. Some plans allow you to swap an iPhone for the newest model without penalty, while others will make you wait for the end of a lease unless you want to incur a penalty.

Regardless of contract particulars, iPhone leasers can stop reading now–selling or trading that device in to anyone but your carrier is just asking for a breach of contract penalty.

SEE: Apple’s iPhone Upgrade Program: The ultimate guide to everything you need to know (ZDNet)

Sell your iPhone at an ecoATM

The freestanding ecoATMs located around the US allow you to turn in an iPhone (or any other smartphone) and get cash for the device.

If you just want to get rid of an old device that’s taking up space, an ecoATM is a great bet–you’ll be getting money that isn’t tied to a store, a cell carrier, or anything else. You also don’t have to wait for a device to be shipped–everything happens right there while you wait.

If there isn’t an ecoATM physical kiosk near you, don’t worry–you can still sell your iPhone to ecoATM’s online arm, Gazelle.

SEE: Photos: Behind the scenes at Gazelle’s processing plant (TechRepublic)

Give your iPhone to Apple for store credit

If you buy your Apple devices right from the source, giving an iPhone back to Apple might be your best option. The Apple GiveBack program site will tell you what your device is worth and give you an Apple Store gift card for sending it back.

You can also use Apple’s GiveBack program to return eligible computers, tablets, and smartwatches. Apple will take any eligible device–not only the ones they make.

Turn your iPhone in to your cell carrier

If you bought your iPhone instead of leasing it, you can still turn the device in to cellular carriers for credit on bills, purchase discounts, or other offers. What you get can vary from provider to provider, so be sure to check out the links below to see what your carrier is offering. Carriers typically accept devices from other companies as well, so you could use a trade in as an excuse to move to another cell service as well.

For cell carriers not mentioned here, please see your provider’s website.

SEE: iPhone XS: The one reason I won’t buy in (ZDNet)

Get a gift card from a major retailer

Another option–and a great one for getting rid of an iPhone in exchange for a holiday gift–is giving that old mobile device to Amazon, Target, or Walmart, or other major retailer that offer electronics trade-in programs; these retailers give gift cards in exchange for your electronics. Don’t limit your search to those three stores, though: Search online to find out if a retailer you frequent offers a smartphone buyback program.

SEE: Want a new iPhone or Android smartphone? Here’s how and where to sell or trade your current model (ZDNet)

Explore your options

All of the various buyback, trade in, and upgrade programs mentioned here will give you an estimate of your iPhone’s value before you commit to turning it in. Those prices can vary from buyer to buyer, and can even be altered further if the buyer decides there’s damage to the phone and that lowers its value.

The final word: Before deciding what to do with your old iPhone, you should research the options.