Google Pay

Dear Lazyweb, there seem to be two different Google Pay APIs. Which should I use? PaymentsClient seems to describe a Google-specific API, and PaymentRequest seems to describe a W3C API that Google plugs in to.

Also, does Google Pay work in desktop macOS Chrome, if you do not own a physical Android device? What about in desktop Safari?


Tags: , , , ,

6 Responses:

  1. Paul Fisher says:

    PaymentRequest is the standard Web API and works on desktop as well (having used it to check out on both Windows and Linux). On Safari it should show Apple Pay. You can test for yourself and see what it looks like at a this PaymentRequest demo

    • jwz says:

      Interesting. If I had known about that I would have been tempted to do Apple Pay that way -- except that that demo says canMakePayment → false on both desktop Safari 10.14.6 and on my iPhone, both of which work with Apple Pay.

    • eSyr says:

      On Firefox it shows "Sorry - Not Available on this Browser // Unfortunately the PaymentRequest API isn't available in your browser. Why not try this on Chrome for Android?". So much for vendor neutrality.

      • jwz says:

        Sounds like "PaymentRequest is the standard Web API" is the new "ed is the standard editor".

        • jwz says:

          That's not fair, 'ed' actually does what it claims to do.

          • tfb says:

            Also ed probably had enough documentation that you could write a compatible version and/or use it without having to endlessly experiment to find out what it actually did.