An Amazon.com employee stocks a shelf at an Amazon.com fulfillment center.

Americans waited until the last minute to buy holiday gifts, but retailers weren’t prepared for the spike.

Heavy spending in the final days of the mostly lackluster season sent sales up 3.5 percent between Nov. 1 and Tuesday, according to MasterCard Advisors SpendingPulse, which tracks payments but doesn’t give dollar figures.

Online shopping led the uptick, with spending up 10 percent to $38. 91 billion between Nov. 2 and Sunday, research firm comScore said.

“We always have last-minute Charlies, but this year even people who normally complete shopping earlier completed shopping later,” said Marshal Cohen, chief retail analyst at market research firm NPD Group.

The late surge caught companies off guard. UPS and FedEx failed to deliver some packages by Christmas due to a combination of poor weather and overloaded systems, leaving some unhappy holiday shoppers.

Justin Londagin and his wife ordered their 7-year-old son a jersey of Russell Wilson of the Seattle Seahawks from NFL’s web site on Dec. 19. They paid $12.95 extra for two-day shipping to get it to their Augusta, Kan., home before Christmas, but it didn’t arrive in time.

“We had to get creative and wrote him a note from Santa to tell him that the jersey fell out of the sleigh and Santa will get it to him as soon as he could,” he said.

Amazon is offering customers with delayed shipments a refund on their shipping charges and $20 toward a future purchase. And other retailers such as Macy’s said they are looking into the situation.

The last-minute surge this year solidifies the increasing popularity of online shopping, which accounts for about 10 percent of sales during the last three months of the year. It also underscores the challenges that companies face delivering on the experience, particularly during the holiday shopping season that runs from the beginning of November through December.

Analysts say FedEx and UPS typically work closely with big retailers to get a sense of the volume of packages they’ll handle during peak times like the holiday season. Extra flights, trucks and seasonal workers can be added if the projections are large.

But this year, David Vernon, a senior research analyst at Sanford C. Bernstein, said weather played a role.

The early December ice storms in Dallas could have hurt operations, he said, and packages can start to accumulate.

And that got compounded by a late surge in shipments, he said.

“Clearly, as a group, (they) underestimated the demand for Internet retailing during the holidays,” Vernon said.

Another problem was the growing popularity of retailers offering free shipping. Amazon, for one, has a two-day free shipping offer that comes with its $79 annual Prime membership. The company said in the third week of December alone, more than 1 million people signed up for the membership.

“Frankly the right hand wasn’t talking to the left,” said Forrester analyst Sucharita Mulpuru. “The marketing teams of a lot of web retailers (offering free shipping) were not talking to the operations and supply chain teams.”

The resulting delayed shipments could be a problem for shippers. UPS and FedEx did not quantify how many packages were affected but said they were just a small fraction of total holiday deliveries.

“The central pillar of their business is a perception of reliability with their customers,” said Jeremy Robinson-Leon, CEO of Group Gordon, a corporate and crisis PR firm. This year’s snafus “just really erodes trust among customers.”

Still, analysts say people will still shop online. “Consumers tend to have a short memory, especially if you fast forward to another year,” said Andrew Lipsman, vice president of industry analysis for comScore.