The world of food stamps is about to go high-tech, and it may turn the grocery industry on its head.

The U.S. Department of Agriculture is testing a pilot program this summer that will allow seven online grocery stores to accept food stamps, including online retailing giant Amazon.com (AMZN). The two-year program will test online ordering and payment, with the USDA noting that online food-stamp purchases need “a higher level of security” because of the risk of fraud. The agency said it would like to roll out the program nationwide and add more retailers.

The program, while modest in its initial phase, has the potential to shake up the $800 billion grocery industry. About 43 million low-income Americans rely on food stamps, officially called the Supplemental Nutrition Assistance Program (SNAP), for $66.6 billion in annual grocery benefits. Amazon’s participation may seem like an unusual strategy, given that it has emphasized its $99 annual Prime program, which is geared to solidly middle-class consumers. Yet Amazon has also been pushing into the grocery business, with plans for check-out-free stores and online delivery services.

Amazon is also taking steps to provide more flexibility for lower-income consumers, such as offering a monthly $10.99 payment plan for Prime.

Get Breaking News Delivered to Your Inbox

At the same time, Walmart (WMT) is focusing on reinventing its grocery services, such as through its new curbside grocery pickup, which has proved popular with millennial parents with young children. The retailing giant depends on its grocery business for 56 percent of its U.S. revenue.

To be sure, the USDA’s online SNAP pilot is likely to start out small, and it’s debatable whether food-stamp recipients will take to ordering groceries online. Yet Americans are increasingly turning to their computers when stocking their pantries. Online grocery ordering is “nearing an inflection point,” with four out of 10 consumers having purchased groceries online, according to advisory firm Gordon Brothers.

Expanding food stamps to online grocery services may help eliminate so-called food deserts, or neighborhoods that lack grocery stores offering fresh, healthy food.

“It’s not just that there’s an opportunity; it’s more than an opportunity, it’s an obligation,” said Larry Scott Blackmon, vice president of public affairs at FreshDirect. “We feel that this payment option should be afforded to everyone.”

FreshDirect, a New York-based online grocery service, had worked on an earlier pilot program with the USDA in the South Bronx, and found that one stumbling block was the government’s restrictions on payment. Food-stamp customers had to accept the grocery delivery in person, swiping their payment card through a machine carried by the company’s delivery people.

“If you look at a traditional model where a customer goes online to order, we can leave the delivery with a doorman or leave at the customer’s house,” Blackmon said. “Currently the delivery person has to carry a separate device that, when the goods are delivered, the person has to have the [electronic-transfer benefit] card and swipe.”

The new pilot program from the USDA will test online payment as well as ordering, and include seven retailers in urban and rural areas. Other retailers besides Amazon and FreshDiect include ShopRite, which will test the program in Maryland, New Jersey and Pennsylvania, and Safeway, which will roll out the pilot in Maryland, Oregon and Washington. Walmart isn’t one of the retailers taking part in the pilot.

“Amazon is excited to participate in the USDA SNAP online purchasing pilot,” Amazon said in a statement sent to CBS MoneyWatch. “We are committed to making food accessible through online grocery shopping, offering all customers the lowest prices possible. Amazon’s selection and competitive pricing can improve the grocery shopping experience for SNAP participants while helping them extend their benefits further.”

For its part, Walmart said it wants to work with the USDA’s Food and Nutrition Service, which administers the USDA’s food stamp program. “We look forward to working with FNS as they continue to explore this opportunity,” the company said. “We’ve expanded our highly popular online grocery service from 5 markets to more than 100 markets over the past 18 months in both large and small communities across the country.”

Walmart noted that about 16 percent of its customer base earns less than $20,000 annually, or on par with the total U.S. population.