Mozilla tests out web payment API for Firefox OS

Summary:The web should support businesses of all kinds which means payments ought to be "a first class feature", says Mozilla.

Mozilla is hoping to streamline payments for web apps by adding a new API into its forthcoming Firefox OS that makes the process easier and more secure.

It announced the first draft of a new payment system API which will be integrated into Firefox OS with the aim of making payment processing simpler and provide better security and control for users.

Mozilla said that while online services such as PayPal go some way to simplifying accepting web payments they aren't integrated into devices very well.

As a result, "Mozilla wants to introduce a common web API to make payments easy and secure on web devices yet still as flexible as the checkout button for merchants," Kumar McMillan, a senior web developer working on Firefox OS at Mozilla, said in a blog post.

While the project is currently restricted to Firefox OS (there is no indication of Mozilla pushing for it as a web standard, yet) the company did describe the introduction of the navigator.mozPay API as "the first step" in allowing web apps running on Firefox OS to accept payments.

The API will allow payments for digital goods or services to be integrated into a payment provider like the Mozilla Marketplace, currently the only place that can accept [test] payments.

"When a web app invokes navigator.mozPay in Firefox OS, the device shows a secure window with a concise UI. After authenticating, the user can easily charge the payment to her mobile carrier bill or credit card. When completed, the app delivers the product. Repeat purchases are quick and easy," McMillan said.

"navigator.mozPay is is different in that there is no concept of what product is purchased, it's just an API to facilitate a payment for a digital good or service, whatever that may be. The payment starts and finishes in the client but further processing and notifications happen server side," McMillan added.

Developers that want to make use of the experimental payment API can test it out using a simulated purchase after generating an Application Key and Application Secret from the Firefox Marketplace Developer Hub.

The company warned that as the API is still at the experimental stage it could change or be withdrawn without notice but intends for it to process payments on the first Firefox OS phone using a whitelist of payment providers.

Mozilla also suggested that by enabling easier payments to and from websites, it could provide an alternative revenue stream for the web that bypasses the reliance on advertising revenue.

"What if users explicitly paid for content instead? navigator.mozPay enables this kind of direct payment model: if something is good on the web, you can pay for it. It already seems to be working well for existing mobile apps. Will mobile ads even generate the same revenue for content producers as they do on desktop? I don't have answers to these questions but one thing is for certain: the web should support businesses of all kinds and payments should be a first class feature of the web," McMillan said.

The company plans to add the API to Firefox for Android and its desktop browser once it has already started shipping it in Firefox OS.

Topics: Mobile OS, Mobility, Web development


With a psychology degree under his belt, Ben set off on a four-year sojourn as a professional online poker player, but as the draw of the gambling life began to wane his attentions turned to more wholesome employment.With several years' experience covering everything in the world of telecoms and mobility, Ben's your man if it involves a s... Full Bio

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.