When Amazon.com (AMZN -2.56%) acquired Whole Foods Market, it said it would make Prime the customer rewards program for the grocery chain. It also opened the opportunity for Amazon to integrate Whole Foods into the Prime service more deeply, and it quickly brought Whole Foods' private label products to its Prime Now two-hour delivery service.

Amazon took it a step further this month, rolling out two new perks for Prime members shopping at Whole Foods. First, it began testing two-hour delivery for grocery orders from Whole Foods in select markets. Then it offered Amazon Prime credit card holders the same 5% cashback discount they receive for shopping on Amazon.com. (Non-Prime card members will receive 3% cashback.)

Further integration of Prime and Whole Foods could result in increased loyalty to the grocery chain.

A person pushing a shopping cart in front of a Whole Foods Market sign.

Image source: Whole Foods Market.

Delivering the goods

Amazon's biggest strength in retail is its logistics capabilities. It's taking those logistics to Whole Foods, offering free two-hour delivery on orders over $35 for Prime members in Austin, Texas, Cincinnati, Virginia Beach, and Dallas. The company plans to expand the service across the U.S. later this year.

Amazon started the pilot program by relying on Amazon Flex drivers -- independent contractors who use their own cars to make deliveries for Amazon. Since Amazon already has a substantial fleet of drivers in certain cities, it can quickly incorporate the service with Whole Foods delivery.

Amazon is still competing with Instacart, which signed a five-year contract with Whole Foods to deliver groceries in 2016 when Whole Foods made an investment in the grocery delivery service. Customers who shop on Whole Foods' website will see instacart as the delivery option, which may curb Amazon's ability to penetrate Whole Foods customer base. It's a challenge, but one Amazon can probably overcome by leveraging its in-store presence.

Meanwhile, Amazon's bigger challenger is likely Walmart (WMT 0.46%), which has a store within 10 miles of 90% of the population. About half of those stores will offer pickup for online grocery orders by the end of the year, giving it substantial customer reach. Walmart doesn't have concrete plans to expand to delivery, but it's experimented with same-day deliveries.

Amazon's co-branded credit cards next to a split avocado.

Image source: Amazon.

Giving the most loyal customers a discount on groceries

Prime members with the Amazon Prime credit card are likely among some of Amazon's most loyal customers. The main benefit of the credit card is 5% cashback on purchases from Amazon.com. Non-members earn 3% cashback. Amazon is now extending those rates to Whole Foods.

To be clear, customers have to hold the credit card, issued by Chase, and use that card at Whole Foods to receive the cashback bonus. This isn't a standard benefit of Prime.

Amazon can benefit in several ways from the move. It can see added sales at Whole Foods from Amazon Prime credit card holders, it can see additional Prime signups, so customers can receive the extra discount, and it can see additional credit card signups, which it takes a share of revenue from for co-branding with Chase.

Amazon faces competition on this front as well. There are several other credit cards that are great for grocery stores. Some even offer a higher cashback rate without restricting shoppers to Whole Foods Market (although other restrictions may apply).

Establishing loyalty

Perks like free two-hour delivery and an extra cashback bonus are great ways to establish a loyal customer base. Amazon may take a loss on these perks, but it can make up for those losses through an increase in sales with higher-than-average margins at Whole Foods.

Whole Foods recorded margins about twice as high as the industry average in 2016. Of course, Amazon is actively cutting into those margins by slashing prices, but there's still a lot of room for operating profits even after throwing in an extra discount and free delivery. Increasing scale can also leverage fixed operating costs inherent in running a brick-and-mortar business.

Consider that Amazon could benefit from more Prime and credit card sign ups as well, which further establish loyalty to Amazon and Whole Foods. Thus, it's driving sales across its entire ecosystem, not just to Whole Foods. That's the value of integrating Prime with Whole Foods, and investors should look for even more benefits for Prime members shopping at Whole Foods later this year.