It’s Prime Day, Amazon’s annual (now two-day) event in which prices are slashed and online shoppers splurge. Analysts predict Prime Day will contribute $8.1 billion in gross merchandise volume to the economy this year.

For some, it’s a chance to pick up that air mattress at a great price. But for others, filling that cart and clicking “Order Now” provides an actual high.

A 2014 study from the Journal of Consumer Psychology found that retail shopping can help reinforce a sense of personal control and ease feelings of sadness. Another 2014 study by the University of Michigan showed that purchasing things can be up to 40 times more effective at providing a sense of control than not shopping. In this study, buyers were also three times less sad than those who browsed but didn’t buy.

J. Craig Allen, MD, medical director at Hartford HealthCare’s Rushford, a substance use prevention and treatment facility, said that anything that makes you feel better is related to dopamine, a hormone that plays a role in pleasure, motivation and learning. This is true of shopping, which can provide a sense of control and a sense of accomplishment.

It’s similar to recreational gambling,” he said, “in that it elevates your mood. But it can become problematic, especially if you are buying items you don’t need with money you don’t really have.”

And, a new study shows that if you down a venti Starbucks before you start shopping, you are more likely to buy more stuff – 30 percent more. Researchers from the University of South Florida found that people who drank a complimentary cup of coffee before shopping ended up spending 50 percent more money and buying 30 percent more items than their non-caffeinated counterparts.

“Caffeine, as a powerful stimulant, releases dopamine in the brain, which excites the mind and the body. This leads to a higher energetic state, which in turn enhances impulsivity and decreases self-control,” the study said.

“I have a cup of coffee in the morning,” Allen said. “It improves my attention, my focus, gives me a boost of energy and helps me get organized and off to work. Those effects also apply to shopping.”

Allen said retail stores that offer free wine or champagne to shoppers are playing on the same biology as those that have a Starbucks at the front of the store.