Mozilla is working on a new JavaScript API, first appearing in the Firefox OS, that will make it easy for people to pay for digital goods and services on the web, either using a credit card, or by adding the purchase to their monthly carrier bills. According to a blog post from Firefox OS engineer Kumar McMillan, navigator.mozPay() is based on Google Wallet's API, but modified for multiple payment providers and, importantly, carrier billing. When a web app invokes the API, a "secure window with a concise UI" pops up on your phone, you authenticate with a password, and your payment gets processed.

Part of Mozilla’s pitch to operators has been a bigger share in the value chain and more ownership and control over relationships with customers, and so it’s likely that we’ll see them tapping into this API to offer direct billing for their own app stores, for instance.

"Payments should be a first-class feature of the web."

The other business that Mozilla is hoping to enable is paid, ad-free web content. McMillan points out that paying for content has been a profitable model for mobile apps, but so far it hasn’t really panned out on the web, which Mozilla frequently points out is a platform of its own. Enabling quick, secure processing for small transactions would make it easier for people to chip in, and while historically people haven’t been willing to out-pay advertisers to cover the cost of online content, the game has changed on mobile, which hasn't been able to generate the same amount of ad revenue as the desktop. McMillan says that "the web should support businesses of all kinds and payments should be a first class feature of the web."

Vendors need to ask to be whitelisted

As far as the future of web payments goes, the Mozilla engineer says that the company plans to work with others in the industry to build a standardized API through the W3C. A major contributor to that effort has been Manu Sporny, chair of the W3C’s Web Payments Group and author of the drafts for PaySwarm, a separate platform for decentralized web payments whose first implementation launched earlier this week. As Sporny points out in a post on Slashdot, Mozilla’s API is currently built so that vendors need to ask to be whitelisted in order to receive payments. The solution isn’t ideal, and Mozilla is the first to admit it.

McMillan stresses that Mozilla's new API is experimental and could "change drastically" without notice, but says that it will ship with the first Firefox OS devices. He also says that Mozilla hopes to incorporate concepts from PaySwarm into its solution down the road, although ideally, multiple stakeholders would collaborate to produce a single standard. In the meantime, desktop and Android versions of Firefox will be next in line to get support for Mozilla's new web payment API.