The United States has the highest incarceration rate in the world, with about 5 percent of the world's population, but 25 percent of the world's prisoners.
For some businessmen, that represents a big money-making opportunity, and few can attest to that better than Ryan Shapiro, CEO of JPay, a company that provides various services for inmates.
"Our goal is to become the nation's digital consumer app company for prisons," Shapiro told CNBC.
JPay got its start in 2002 by offering electronic money transfers for inmates. This way, inmates' families could transfer money to a prisoner's account via computer or smartphone instead of leaving their homes to send a money order.
Those money transfers represent the bulk of JPay's business—about $50 million in revenue last year—but the company also offers services like email, tablets, video visitation and music downloading. (It's now piloting an e-books program in a prison in Ohio.) JPay has been profitable since 2006, and processed over $500 million in 2013, said Shapiro.
Helping JPay's business is the fact that it has a near-monopoly for providing these services. The company now operates in 32 states and over 1,200 facilities nationwide, servicing about 1.7 million inmates.
Revenue sharing with states
Aside from prisoners, the business has another beneficiary: state coffers. In return for doing business, JPay gives the state a cut of its revenue. For example, if JPay charges $3 for a money transfer, the state might get 50 cents, depending on each individual agreement. (The company charges $1.45 to $24.95 per transfer, depending on the amount of money sent.)
"Government agencies can and will accept a portion of the revenue as an incentive to put the program in, because if there's any agency or department that's strapped for cash or for money, it's corrections," Shapiro said.
JPay's fees vary based on such factors as how much the state takes and fees paid to third parties like banking software companies, Shapiro said.
States vary as to what services they will allow businesses to sell to inmates "It really depends on the 'political mood," Shapiro said.
At the North Dakota State Penitentiary, where over 50 percent of the population uses JPay in some form, all of the company's services are allowed, Warden Colby Braun said.
"It's a way to improve what they have and improve their lives, that's the whole focus of this," Braun said.
Is it right to profit from prisoners?
Critics, though, question a model where states and companies benefit on the backs of prisoners and their families.
Jack Donson, who worked at the Federal Bureau of Prisons for 22 years, doesn't think so.
"I always say we're a third-world correctional system in the United States." Donson said. "This is a capitalistic society, so I fault more the government—bureaucracies—who are profiting from this as well. The sentence is the punishment."
Shapiro argues that the services help prisoners.
Read MoreFake wine collector gets 10 years
"Our tablets help rehabilitate inmates so they are better equipped for success once released. Technology also plays a role in behavior modification—an inmate that is engaged during the day is less likely to act out in violence," he said.
Shapiro also claims that the state's cut of JPay's business goes back to the inmates, whether in the form of recreational activities or building infrastructure to support educational programs.
Donson, who now runs a private prison consulting business and serves as an advocate for prison reform, disagrees.
"I also think there's an overplaying of, 'Oh, this money goes back to benefit the inmates.' I think that's true, but I don't think it's true to the extent that they portray," he said. "If you would do some due diligence on where that money really goes, I think you would find that not a lot goes directly to inmate programs."
(Another important issue is how these fees impact families outside the prison who pay them. Shapiro says its fees are too low to affect inmates' families. A joint investigation by the Center for Public Integrity and CNBC found that many families are financially burdened trying to keep up with all the costs associated with having a relative or friend behind bars. See that report here.)
Will regulators go after other prison businesses?
Another objection some critics have is that prisoners and their families could easily be gouged by the fees and commissions.
In fact, federal regulators have already gone after some companies, especially those that provide phone services for prisoners.
In 2013, the Federal Communications Commission capped phone rates after an investigation revealed that prisoners were being charged what the agency called "exorbitant" rates.
Following a hearing on the issue, prison phone company Pay-Tel, CEO Vincent Townsend said that his industry abused the public, and that's why regulators had to ultimately step in.
"I'm not a fan of regulation. But if your industry won't self-correct yourself, then you have no choice—regulators at some point are going to step in," Townsend said. "My counsel to other industries that serve a prison population is you better pay attention to what's the ethical, right, moral … because if you don't treat people fairly, ultimately it's not a long term business plan."
JPay has not been targeted by any Federal probe.
Regardless of the flaws in the system, Shapiro said he is providing valuable services to those behind bars.
"Before JPay came around, that type of customer service did not exist in corrections," Shapiro said.
"It's unfortunate that no one's come out with a better model and if somebody did, that would be fantastic. But nobody has yet."