Integrating App Payments

money_imageToday we’re featuring a guest post from Andy McKay, Engineering Manager for Firefox Marketplace. He’s got some exciting news to share about setting up payments for your apps…

The Firefox Marketplace now accepts payments for apps and in-app payments. This allows developers to earn some money from their work.

Currently we’ve got just one payment provider who is integrated into Firefox Marketplace, the great team at Bango have been integrating credit card and carrier billing. But we don’t want to stop there, we’d like to have lots of options for different payment providers that meet the different consumers and developers needs.

Implementing payments for the Firefox Marketplace is a little different from any other site because, unlike most implementations, Mozilla does not look after holding money and paying developers, the payment providers do. This creates issues for payment providers who don’t normally operate this way.

To explain how we do things at Mozilla, we wanted to write a specification of how to integrate with the backend. But writing specifications is no fun, writing code is more fun. So we wrote a sample backend for payment providers, it’s called Zippy.

As it turns out writing Zippy gives us a bunch of other advantages:

* Tests can now be run on the entire payment flow from start to end without having to spend real money. This testing sandbox is something many payment providers do not provide.
* We have real HTML, JS and CSS for the payment pages so payment providers don’t need to implement it, just integrate our code.
* We can use the Mozilla localisation teams to provide localisations.
* Payment providers now have a working implementation they can poke and prod and examine.

Here’s an example of a payment using the Zippy backend, in French:

So if you are payment provider and wanted to integrate payments with the Marketplace, all you have to do is implement the Zippy API on your end in what ever language or platform you like. It’s not intended you’d ever use Zippy as is, rather implement the same REST APIs. We’ll need to enable you as a payment provider in the Marketplace, so you’ll want to speak to us before you start doing work on it.

The code is available under the MPL, is written in Node.js and is the hard work of David Larlet, Stuart Colville and Kumar McMillan. It is in the early days right now, at version 0.1 and I am sure there are lots of new features to come.

No responses yet

Post a comment

You must be logged in to post a comment.