It’s a scene many people may see this month: Wandering around the car lot. The endless haggling. The nagging sense when you finally drive away that you were tricked into paying some unnecessary fee.

The car-buying process is painful, but some buyers are taking the dread out of the experience by doing the bulk of the negotiating online. Buyers today can pit car dealers against one another in the search for a lower price, all while sitting at home in their PJs. By starting those discussions via e-mail, buyers can negotiate while they still have the most leverage over the dealer, which is doing everything possible to get that person to walk into the door.

Some salespeople may be skeptical of the buyers they chat with online because it’s difficult to know how serious the person is about making a purchase until they meet face-to-face, says Geoff Pohanka, president of Pohanka Automotive Group, a dealership based in Washington. “When a person is here we know they’re committed,” he says. “We don’t want them to leave the dealership without buying a car.”

But even if the final negotiation doesn’t happen until you’re at the dealer, it’s worth it to put in some work beforehand to save as much as possible. Here are a few steps to help you find the best deal before you set foot on the lot.

Minimize your time at the dealership by negotiating online. (iStock)

Narrow your options. Before you get serious about negotiating, you need to know what car you want. Start by researching cars online to figure out what make and model appeals to you. If you still aren’t sure about what type of car you want, schedule a few test drives to get a sense of what the cars are like in person — but don’t buy anything until you’ve done more research. Use Web sites such as Kelley Blue Book and TrueCar to find out how much the car is selling for in your area so that you can get a general sense of what a fair price might be. Also research average loan rates to get a sense of the financing options available.

Next, e-mail as many dealers as possible. Find out which dealers carry that car and reach out to the company by filling out a contact form on the Web site, which will usually put you in touch with a salesperson. Contact as many dealers as possible that carry the car within a reasonable driving distance, says Matt Becker, a financial planner near Pensacola, Fla., who used e-mail to negotiate for a lower price when he bought a car two years ago. Not all of them will respond, so casting a wide net — it can be as many as 40 or 50 dealers — will help you have options.

Be specific. Your e-mail should be short but detailed. Say the make and model that you’re looking for and tell the dealers what features are important to you, as well as which ones you don’t care about as much, Becker says. For example, if you’re buying a used car, what mileage are you looking for? Do you care what color the seats are? Are you willing to buy a model from last year?

It also helps to set a rough timeline for when you’re planning to buy the car so that they know you’re serious and respond to you with time, he says. Tell the dealers you want the out-of-door price that includes any taxes and fees you may have to pay. Some dealers may be reluctant to offer this, but push for it, Becker says, since it’s the best way to make an apples-to-apples comparison.

Ask for a better deal. Once the offers come in, it’s time to negotiate. Let the dealers know if you received a better offer somewhere else to see if they can match it or sweeten their offer another way. Once they stop reducing the price, they’ve probably gone as low as they’re willing to go, Becker says. (Though if you would really prefer to work with a particular dealer, it may not hurt to tell them what price you received somewhere else.) Stress the fact that you only want to see cars that fit within your price range.

Check out the car in person. Once you’ve narrowed your choices down to one or two offers, it’s time to go see the car. Bring proof of the price offered to you, by printing a copy of the e-mail or of an ad you saw online. When you’re in front of the car, test out the features important to you, Becker says. Do your car seat and stroller fit as expected? Do you notice any strange sounds when driving the car? Review the Carfax report for used cars to look for any issues in the car’s history. And ask if it would be okay to have a mechanic look at the car, especially if it’s used, Becker says. Any issues spotted by the mechanic can be used to bring the price down further, he says.

Don’t settle. If all has gone according to plan, you already should have a pretty attractive offer in hand. But that doesn’t make it the final price. Certain aspects of the purchase, such as the terms of your loan if you’re financing a car, may not be settled until you’re at the dealer but don’t feel pressured to take the first loan offered to you. Ask them to compare rates and terms from multiple lenders until you find a loan that’s affordable. Then go with that lender.

And make sure the final package includes everything that’s important to you. If there is a second offer that included another feature or perk not being offered at the current dealer, let the salesperson know. Dealers may be willing to address any last minute concerns — remember that they don’t want you to leave without making a purchase.

Read more:

August is the best time to buy these five things

It might be time to ditch the checking account you opened in high school

Why now is the best time to find cheap flights for the holidays