Payment Request API
w3.org
w3.org
Background: Persona was a centralized, Mozilla-run auth service designed to bootstrap a decentralized protocol. In theory, after the protocol was widely adopted, Mozilla could shut down the centralized service. In practice, nobody adopted the protocol and the whole thing collapsed when Mozilla shut down the service.
I think the whole endeavor would have been more successful as self-hosted software. The downside is that each website would require separate email verification (until the protocol got adopted), but it would have been far less confusing to everyone and it most importantly it still would be running today. On the other hand building shrink-wrap cross-platform software is a lot harder than running a service and publishing some javascript, so I understand why they did what they did... but here we are dead in the water.
I would love to see Persona revived as a self-hosted auth library someday, and actually think it could still be successful in that role. It encapsulates the whole verify-your-email step; it leverages several existing federated login solutions to skip the roundtrip; it could still revive the decentralized protocol.
I haven't looked at this Payment Request API and I'm as skeptical as anyone, but if it doesn't rely on any kind of centralized service, it at least has a chance.
Sounds a lot like the Matrix chat protocol. Who’s using a private Matrix server?
I feel like a lot of these companies think they’ll handle the bootstrapping stage with economies-of-scale from having one central node; but in practice, having that one central node enables extra network effects (e.g. super-low-latency interactions with people on the same node) that make people resistant to eventually becoming more distributed.
I think WordPress.com represents a better model: it’s a first-party hosting provider, but everyone that signs up is signing up for their very own instance. (Maybe some things are shared under the covers—that’d certainly be good engineering—but everyone gets full control of their WordPress “engine”, with their own plugins, scheduled tasks, etc.) This way, people are used to the concept of these blogs being a loosely-federated network with pingbacks et al from the start, rather than everything being one server with one dashboard. Very easy from there to “lift” your instance out into a separate enterprise deployment; very easy for other cloud providers to spring up and offer you an import tool, to move “your server” from service X to service Y.
Why is that a problem, by the way? Wouldn't we expect something like Persona to be implemented in new software projects first, then gradually get adopted in existing software?
Nobody is going to gut their auth system to implement something shiny unless many are asking for it - i.e. by saying "oh it's so easy to sign into $rival_website because they use Persona, why can't we get that here?"
Similar timeline for browsers working on an implementation.
You've got to hate these short attention spans.
Seriously: Anything that's browser standards work moves on the time scale of multiple years. Yes, that goes for Persona too - launched in 2011, finally canned in 2016.
Just because your pet project doesn't launch doesn't mean there's "short attention span for difficult problems".
Any standard can get adopted in two ways: either imposed by a dominant player, who can effectively force others to follow; or pushed by a wholly-independent 3rd-party that is completely neutral. Persona could not follow any of those strategies, and it withered, predictably.
As for federated auth... Twitter, Facebook, Google and Github authorizations seem to work okay-ish. Integration is rarely good. Login, User and Account are three different things, and people tend to conflate them poorly, this causes issues down the road in most projects.
https://battlepenguin.com/tech/the-decline-of-openid/
(Super confusing name since it was also the name of a type of Firefox theme engine)
https://stripe.com/docs/stripe-js/elements/payment-request-b...
For example, the private key gets stored in hardware protection thus cannot be exported. So the UX is a non-starter if the user wants to log in from more than one device.
People will say that's a feature. But it's also why it's never going to replace passwords.
Yes I'll say not being able to get that symmetric key out of the hardware token is a feature, because it is. Without that feature you'll have to educate users about how to care for their symmetric key and every time you inevitably fail they get exploited.
Regarding export of private keys -- some crypto hardware wallets also support the FIDO[2] specs. -- so there you have the option to use the 12 words to setup a new hardware with the same private keys ...
Logins are often provided as part of whatever framework you're using.
Can someone expand on how Stripe is using this, how it affects integration and the end user experience?
If you have a saved credit card in your browser or apple/Google pay on your phone, it will work.
Demo describes it better:
Bank accounts (ACH/SEPA), EU's relatively recent push for MFA for credit card transactions, India's mandate overall for MFA, China's gov't regulations around customer payment data not leaving the GCF, validation of China Union Pay cards in North America, etc., are all complex instruments/workflows that are no small feat to handle and handle well.
Instead of facing a paywall for a yearly subscription, you pay around $0.005 to read an article. But with a currenncy that anyone can own and can really handle micropayments.
I think the only solution that has a shot is enabling and improving the UX of spending plain ol' USD with the same motion we thoughtlessly buy groceries.
For example, a specific low overhead micropayment channel. It's kind of silly to pay the full cost of things like refund ability and fraud protection on a $0.005 purchase.
Without this, I don't see how micropayments will ever be a thing.
People often bring up the mental overhead of a la carte pricing for things like individual Netflix shows vs $12/mo. But I think they're also looking at it through the lens of the current world where you can't even price something below $1 if you're going to accept anything other than cash.
> ... complex instruments/workflows that are no small feat to handle and handle well.
Cryptocurrencies are, by definition, currencies. Just like other ones, they do not address what commerce workflows exist to satisfy.
And as to "0 fees and instant transactions" argument...
That's all fine and dandy until a purchase is contested. At that point, the lack of a third-party which arbitrates between the merchant and customer, with legally binding consumer advocation mandated, will become painfully obvious.
None of these are viable outside of crypto-advocates.
I soon realized, however, head-in-the-sanding the other current use cases and their complexities would be an amateur mistake.
PR API is part of a set of specifications designed to improve payments on the Web. Most importantly, it is the invocation side of a cross-origin payment service ecosystem we're trying to seed.
The other half is Payment Handler API which is less mature but has been rolled out in Chrome and Edge: https://www.w3.org/TR/payment-handler/
Think of PR API as the payment service discovery/invocation side and PH API as the service provider side with the possibility of the service provider being a native app if the platforms supports it (e.g. Android lets apps register as payment apps and Safari + ApplePay works like this already).
The website invokes the PR API (I want to get paid and these are the payment methods I support) and the browser matches the supported methods the website supports to payment apps the user has installed that support the same methods then prompts the user to pick the app they want to use. (Payment apps register/install themselves via the PH API)
If you invoke Google Pay on Chrome today both of these APIs are already in use. Google Pay is deployed as a fully web-based Payment Handler with no special privileges in Chrome.
It's important to note that many of the tricks (like hidden iframes from PSPs) that are used to make payments frictionless today are going to become useless as browsers roll out more changes to protect user's privacy (e.g. killing 3rd party cookies and storage). The privacy improvements are good but they have significant side-effects on UX.
PR API and PH API offer a way for websites to invoke a payment app from another origin (eg. shop.com invokes paypal.com) without losing context (the payment app is rendered in a modal window not via a redirect) and without needing to know up front what payment methods the user supports (good for privacy).
I agree with @mixedbit that there is a risk this doesn't gain sufficient adoption to stick around but I believe the combination of a decreasing number of alternatives and increasing support and interest from browsers suggest it has a very good chance.
We are also working closely with the card networks to support Secure Remote Commerce (SRC) via these APIs providing a significantly better card payments experience than most websites offer today.
Finally, the movement toward payer-initated payment methods whereby the payer or a third-party payment initiation service (think PISPs under PSD2) is handling the payment (as opposed to a PSP on behalf of the merchant capturing the user's card details) suggests the API will gain traction if we can get the design right to support these new payment methods (e.g. SEPA instant credit etc).
If you have strong opinions about factors that will contribute to the success of the API (especially wrt adoption) please provide your feedback on our Github repo linked from the spec.
There is a lot in the wikis that covers our current thinking, the whole process is done in the open.
The high level of interest and activity in the community led W3C to form an interest group to explore if payments was a WG-worthy topic and I also participated in that.
When we finally chartered the WG I was approached to chair and agreed. We've re-chartered twice since and I continue to chair.
The job is made a lot easier by the fact that we have a great W3C staff contact who does all the heavy lifting.
Here is a not-so-uptodate PoC showing SCTInst with a live Raiffeisen Bank account (Austria) via S€PA.digital in Microsoft Edge: https://sepa.digital/pay.mp4
As Webkit / Safari only implemented the Payment Method ID for usage with Apple Pay (on the web), there it is only possible to redirect the user to a web page (a Progressive Web App which is else rendered in the PR modal). ... but in combination with the QR code format recommended by the European Payments Council* you'll get an other nice UX like "iOS Scan & Pay": https://www.linkedin.com/posts/renekapusta_apple-ios-scan-pa... // vimeo.com/391365723
QR codes suck you think? Card schemes & payment apps too.
So, I think "Request to Pay" in combination with eIDAS will be the future of frictionless SEPA / EUR real time payments (in combination with PR API to exchange the checkout data): https://www.linkedin.com/posts/renekapusta_instant-account2a... // vimeo.com/391881139
btw.: Persona was quite nice -- WebAuthn seems promising too (but it is/was only supporting hardware tokens and not the finger print reader on osx at my first trials ...)
) https://www.europeanpaymentscouncil.eu/document-library/guid... *) https://en.wikipedia.org/wiki/EIDAS
Could you point me to resources to learn more about this? I work on integrations like this. Is it that iframed PSP integrations won't work at all, or they won't appear as seamless?
In short, 3rd-party cookies and storage are being blocked (or phased out). This means you can insert an iframe into a page but the cookies/storage it has access to will be partitioned based on the origin of the top-level context.
E.g. If PayPal embeds an iframe in walmart.com's site and the user logs in to PayPal to pay then goes to target.com's site where there is also an iframe embedded the user will have no active session and will need to login again.
Just saying those "tricks" are going to die sometime in the name of "privacy" definitely needs a little more unpacking. There are likely tens or hundreds of thousands of sites with those implementations live today.
I ask this as someone who works at a large online retailer whose CISO has specifically asked to keep them informed of things that could improve our security posture around payments. Inability for a site to store payment information would discourage large sites from supporting this, or at best slow the implementation and support of it.
Apologies if this is somewhere in one of the two documents. I tried to skim through the ~150 pages to find related items.
If the site knows you and has payment credentials stored they won't need to use Payment Request API (although they still can).
Storing payment credentials differs by payment method. If you're talking about card payments then you have to deal with things like PCI-DSS and/or tokenization but there are other ways to pay which may support this use case more explicitly, for example by capturing explicit permission from the user to allow the merchant to make future purchases seamlessly.
This is something we're trying to find a standard protocol for with https://openpayments.dev so that the ecosystem is less fragmented. But, this is not linked to the W3C work explicitly
If this API gives a fast checkout experience without storing data, then you've potentially got the benefit of storing payment info without the exposure of storing sensitive data.
(disclosure: I work at google on the web, but not on anything payments related)
At a certain scale, any reduction of friction results in $xx million in increased sales.
In my personal opinion recurring payments are quite specific to the payment method. For example, how would one do a recurring Bitcoin payment?
At Coil we are trying to come up with some open standards to address this problem space that we hope will complement the W3C browser APIs. We base our standard around the concept of a "mandate" which the user authorizes a payee to create in against their account and which allows that payee to "push" funds from the account to themselves at specific intervals and for predefined amounts. We prefer mandates to the card-based model because the user is in control and can cancel the mandate at any time.
You can read a bit more about that work here: https://openpayments.dev
Excuse the state of the website it's under a small redesign but the content is mostly there, albeit a little rough right now.
also: https://developers.google.com/web/fundamentals/payments
There is also some good content on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Payment_Req...
The ISO20022 RA (Swift) has been involved since the beginning as have numerous banks from Europe and LOTS of non-card payment methods are represented through their associations or scheme participants.
Part of the challenge is that the standard needs implementors to participate and contribute use cases and designs and users and merchants that use these systems to implement and test them.
The PSD2 ecosystem is also still quite nascent so even though we've had Open Banking UK, STET, Berlin group etc engaged they are still figuring out how their systems will work. These APIs are simply a channel by which their systems will ultimately be used.
I've seen some very good Open Banking demos using the PR API and PH API but they aren't in the market yet.
I'll also confess it is a bit of a chicken and egg situation. They won't prioritize support for these APIs until they see adoption by browsers and up to now Edge and Firefox have been slow to adopt. Edge is now Chromium based and has inherited all of the work already done to implement so that has changed overnight and I believe Firefox are keen to progress but just need to get this work on into their pipeline.
That combined with a auto “spend and replace” would actually make using crypto as simple and easy as say, Apple Pay.
And merchants could accept it without a payment processor, and pay no fees, have no risk of chargebacks, maybe pass some savings back to the customer, etc..
Pretty sure a lot of blockchain projects are banking on this spec becoming official.
I am contributor to Interledger
Thanks for sharing Interledger! My post may have come off aggressive but that was not my intention. It was to ensure people don't conflate blockchain with Interledger.
Matt
But your comment suggest that you didn't understand what a blockchain is. Blockchain is just a specific type of merkle tree. A git repository is also a merkle tree and also a chain of blocks. It just isn't revered to as blockchain because the term didn't exist back when git was created. In short blockchain is not "cryptocurrency scam, slow database" and all the other negative descriptions people use these days. It's just a technology that was/is used for that. Instead of blockchain it should be refereed to as DLT because it doesn't mater if there is a chain of blocks the key part is that is that it is distributed ledger which requires some sort of consensus mechanism and that is what makes this tech "new" compared to git or any merkle tree-like thing that we had before blockchains where a thing. DLT also makes it obvious that it is absolutely useless to use in a centralized way.
Plenty of tech terms has got negative associations over time because of how the tech was used and not because the tech is actually bad. P2P for example. People connect this with illegal file sharing, slow and buggy connections, non-private because your IP is visible etc. etc. While technically non of these properties are related to P2P at all it's actually quite the opposite.
Blockchain proponents have done a really good job of turning their terminology into dirty words. It's vaporware at best and actively malicious at worst. Just no.
I suppose it required IE to die and Google to produce a browser with an integrated payment solution. And also it's only recently that end-user devices have become secure enough to tolerate storing credit card info on them, at least on Android and iOS devices.
"It's important to note that many of the tricks (like hidden iframes from PSPs) that are used to make payments frictionless today are going to become useless as browsers roll out more changes to protect user's privacy (e.g. killing 3rd party cookies and storage). The privacy improvements are good but they have significant side-effects on UX. PR API and PH API offer a way for websites to invoke a payment app from another origin (eg. shop.com invokes paypal.com) without losing context (the payment app is rendered in a modal window not via a redirect) and without needing to know up front what payment methods the user supports (good for privacy)."
Like the successful lawsuit against Apple regarding the closed NFC API for payments in Germany, I suppose the same would apply for "Apple Pay on the web" (non-discrimination of other payment methods).
I.e.
items = [...]
currency = "USD"
value = 5.00
#vs
amount = {"currency": "USD", "value": 5.00}Two arbitrary edge cases with multiple currencies mixed in single purchase that come in mind; i'm not saying that they apply here, but they are relevant in some cases:
1) card txns with currency exchange - txn currency differs from card currency, the merchant asks for and receives some amount in currency A, the customer gets shown, confirms and pays amount in currency B.
2) tax-included payments (e.g. VAT where applicable) for txns in foreign currency; you might have a payment for 1000 USD but you'd need to calculate/indicate/store the VAT in the local currency.
p.s. I hope it catches on.
I'm very torn on how to feel about this. On one hand, it would be better than the current bonanza where every online shop has their own home-rolled thing for credit cards, on the other, I don't like the idea of having my CC info stacked on top of the already massive trove of data Google is gathering about me.
Worth saying today Chrome already supports storing credit card details for auto-fill.
You're free to keep your credit card details in your password manager or type it out every time.
Who is out there hand-rolling credit card auth?
Use Stripe, Paypal, Amazon, or something similar folks, PCI compliance is a nightmare.
It's extremely common, and few of them get PCI compliance right. In my experience they usually just feed a website form directly into email.
This is your mom and pops, local bed and breakfast, small specialty store type websites. They hire someone to just make it work.
As always major browser vendors already have this implemented and I don't know whether to blame them or not. Specification finalization is a slow process and can be made better in my humble opinion.
im sad that the Contact Intent API proposal is dead.
https://www.w3.org/TR/contacts-api/
this means you cannot create a web app that competes with native apps in UX for anything involving communication.
i suspect it died because neither google nor apple want you to move/keep your contacts easily out of their sync'd address books.
is this on any standards track?
seems like a very sinple thing to spec out and implement. just press a button, pop up an address book, just like a file selector.
Is there a synchronous abstraction for payments? So basically the user would submit a JSON object with the payment information and get a single atomic approve/deny response that is final?
If so, then I'd like to see a wrapper for this that encapsulates all of the async minutia into a sync protocol.
If not, then I think that reveals the underlying complexity of payment handling which is due to its asynchronous nature. There are so many reasons for payments to be rejected, returned or fail outright that perhaps nobody gets it all right. In the end, somebody has to moderate it and make it a manual process at some level.
So that's the part that that I'd like to see someone solve, regardless of the interface. Maybe Stripe or Square already have? Sorry if I'm using the wrong terminology here, I haven't done much merchant stuff, but have a nose for the fundamentals that make these types of things complex.
e.g. Stripe already have support for PR API in their SDK
I think this is where crypto currency shines, as it doesn't require a deep stack of agents to facilitate a payments. It requires two parties (maybe a third for escrow), and money can move with less friction.