Mastodon

How to Get Apple Pay on the Web

Posted by Matt Birchler
β€” 2 min read

As it stands today, Apple Pay works in 2 environments:

  1. Physical retail via NFC "tap to pay"
  2. In-app via the iOS Apple Pay API

These are a great start, and they take care of a lot of the transactions that people make on a regular basis, but there's one area that isn't covered: the web.

No matter how good of a web developer I am, I can not incorporate Apple Pay into my online store due to the limitations of Apple Pay. These limitations make total sense, but it would be so nice if there was a way to use Apple Pay on my website. There are rumors swirling that Apple is going to show a way to do just that in iOS 10 coming later this year, so I wanted to dive into how they could possibly do this.

For a point of comparison, Google just had their I/O conference where they also discussed the limitation of not being able to use Android Pay on the web, and they introduced a solution that they think will solve the problem: Instant Apps. The idea is that when you're checking out on Target.com for example, you'll be able to seamlessly install the cart portion of the Target app and run your payment through an app, despite it not being completely installed on your phone. It's a clever solution, but it also feels a little hacky. It's cool technology, but it's ultimately a workaround solution and assumes a lot of things. It assumes:

  • The customer is on the newest version of Google Play Services
  • The merchant has an Android app
  • Their app supports Android Pay
  • They have updated the app to support Instant Apps

That's a lot of assumptions, and the odds of a customer and merchant coming together, both meeting all these requirements is pretty slim. I don't see Apple doing this, as Google's Instant Apps don't sound like the sort of thing Apple would even consider.

I think Apple's solution is going to be building Apple Pay into Safari, the default web browser on iOS. They'll have an API that can be called from a website that will only work in Safari. As a web developer, I'll be able to write a function (via JavaScript, most likely) that will call the Apple Pay API in iOS, submit the transaction from iOS, and return my site the response (transaction approved, declined, error, etc.) so that I can complete the experience for my customer.

This solution seems technically possible, and would be a great opportunity for merchants who are looking for a payment option that reduces their PCI compliance requirements as all the payment information stays completely off their web servers. It would also help customers have an easier checkout experience than entering a dozen or more text fields when paying. I hope Apple is working on this and we see something very similar to my proposed implementation.