Walmart worker
A Walmart worker gathers items for customer pickup in a store Rogers, Ark., on May 31, 2018. Rick T. Wilking/Getty Images

Nearly one-third of Walmart's online shoppers in the U.S. are willing to pay $10 extra to get their goods sooner — and the added cost is helping push the company's e-commerce business toward profitability.

Walmart says express delivery purchases will arrive in two hours or less and in March it announced an "on-demand" early morning option that starts at 6 a.m. and gets items to customers within 30 minutes.

Walmart Chief Financial Officer John David Rainey told CNBC on Tuesday that 30% of orders placed during the past two quarters came with payment for "express delivery."

As a result, the retail giant's online sales operation is "getting very close to profitability because we're able to use some of the cost of delivery with these incremental fees that customers are willing to pay for convenience," he said.

Rainey revealed the program's success while discussing Walmart's strong third-quarter earnings, which beat analysts' expectations.

The $10 fee applies to all online orders and is added to delivery fees that range from $7.95 to $9.95 for shoppers who don't subscribe to the company's Walmart+ membership program.

Members pay $5.99 for orders under $35 and get free, standard delivery of orders over $35.

Walmart+ memberships cost $98 a year but the company last month cut the price in half through Dec. 2 for new members in bid to compete with Amazon, which charges $139 a year for its Amazon Prime membership program.

Amazon Prime has an estimated 180 million subscribers and Walmart+ is expected to reach 32 million subscribers by the end of this year, Reuters reported last month.