Shoppers and consumer advocates are fuming at major retailers such as Victoria's Secret, JCPenney, and Best Buy for keeping a secret database on customers that determines who should be banned from making returns.

The database, created and maintained by third-party analysis firm The Retail Equation, uses unknown thresholds to calculate whether a shopper is a risk by returning too many items, returning a high-dollar item, returning an item that is often stolen at the store, or returning items right when the store closes, according to the company's website FAQ.

Just over 1 percent of all returns are likely fraudulent, according to estimates from a 2017 survey of retailers by the National Retail Federation — but that's a large enough number that stores now scan your driver's license when you want to make a return, in order to look up your transaction history and see whether you should be allowed to make the return.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Among their scams, fraudsters sometimes will swap UPC codes between a higher price and a lower price item and cash in on the difference. Or they'll scour parking lots and garbage for high-value receipts, then shoplift the item off the shelf and try to return it.

Retailers say they're just trying to clamp down on the $22.8 billion lost each year in fraudulent returns —but consumers say they've been unfairly caught up in the dragnet.

Recently, Jake Zakhar posted on Twitter after he was flagged trying to return three cellphone cases he 'd bought as gifts. He had bought them as extra colors for his sons and thought he'd be fine as long as he returned them within the 90-day return policy. But when he tried to make the return, the salesperson told him that he'd been banned from making any returns or exchanges for a full year.

The clerk directed him to request his report from The Retail Equation. When he did so it only listed the three cellphone cases, worth a total of around $87. He asked the firm for the ban to be lifted and was declined. An appeal to Best Buy was referred back to the third-party company.

Is this really excessive @BestBuy ? 3 total exchanges account for $87.43. I suppose losing me who just spent 5k on appliances over 3 cell phone cases is worth it. Banned from returns for a year. You lost a high dollar purchaser permanently over your lame system. #tresucks pic.twitter.com/Uf5N0renY2 — Jake Zakhar (@jakez_oc) January 24, 2018

"I suppose losing me who just spent $5,000 on appliances over 3 cell phone cases is worth it," he tweeted. "Banned from returns for a year. You lost a high dollar purchaser permanently over your lame system."

“On very rare occasions — less than one-tenth of one percent of returns — we stop what we believe is a fraudulent return,” Carly Charlson of Best Buy told NBC News. “Fraud is a real problem in retail, but if our systems aren’t as good as they can be, we apologize to anyone inappropriately affected.”

Stephen Holmes, a spokesman for Home Depot, which also uses The Retail Equation, said the store only uses the service when customers attempt to return without a receipt.

"Returns fraud is also often the work of organized retail crime rings, thus funding serious crimes," Holmes told NBC News, including "feeding the opioid epidemic."

In 2011 a Best Buy customer sued for violating a privacy law after his ID was scanned by Best Buy for a return. He asked the manager to delete the information but the suit says he was refused. His suit was eventually tossed out.

Stores say they have posted warnings on signs at checkout and disclaimers on receipts to warn shoppers about the return policy caveats.