Walmart and Amazon are starting to go after lower-income shoppers online.

Dollar stores' explosive success has proven that marketing to lower-income customers can produce results.

So far, e-commerce efforts by major retailers have mostly targeted wealthy customers, but the market is becoming saturated.

Retail giants have focused much of their online efforts on wealthy Americans. Now, companies like Amazon and Walmart are trying to target customers living in poverty.

Earlier this year, the US Department of Agriculture announced that Walmart and Amazon would be among the retailers participating in a pilot program that allows SNAP recipients to buy groceries online.

"The Internet might be the next big hope for rural food deserts," Axios wrote of the pilot program.

E-commerce efforts at major players like Walmart and Amazon have, so far, been primarily focused on wealthier Americans. Online shoppers tend to be more affluent, with 55% of e-commerce shoppers living in households with incomes greater than $75,000.

Dollar stores aren't fancy — but they're thriving. Brian Killian/Getty Images for Procter & Gamble

In 2015, the average income of an Amazon Prime household was $69,300, roughly $15,000 higher than the average American income. Walmart's e-commerce investments have focused on trendier brands that are significantly more expensive than its typical wares, such as the hip women's brand ModCloth and the menswear line Bonobos.

However, retailers are now realizing that there's money to be made on the other end of the spectrum.

As department stores like Sears and Macy's have struggled to grow sales, dollar stores and other super-budget retailers are dominating. From 2010 to 2015, dollar store sales grew from $30.4 billion to $45.3 billion in the US. In September, dollar stores and discount stores attracted more purchases than any other type of store, according to a Gordon Haskett survey of roughly 500 households.

Dollar stores' success is based on their ability to provide what lower-income households need when they have no other options.

“Essentially what the dollar stores are betting on in a large way is that we are going to have a permanent underclass in America," Garrick Brown, director for retail research at the commercial real estate company Cushman & Wakefield, told Bloomberg. "It's based on the concept that the jobs went away, and the jobs are never coming back, and that things aren't going to get better in any of these places."

Now, Walmart and Amazon want to win over that "permanent underclass" online.

The quest for wealthy customers is increasingly competitive — and saturated. Last year, Piper Jaffray estimated that almost 75% of households with an income of over $112,000 a year are Prime Members. Meanwhile, less than half of households making $21,000 to $41,000 (the lowest bracket measured by Piper Jaffray) were estimated to have a Prime membership.

Changes such as the SNAP pilot program and Amazon's less-expensive Prime for low-income customers are attempting to change that. Dollar stores have proven that marketing to lower-income customers can be a profitable decision. Now, major retailers are ready to apply that theory to e-commerce.