e-commerceprogressive-web-appspaymentpayment-request-api

What is the relation between Payment Request API and PWA?


Is Payment requests API built to work as part of PWA only, or can be used in regular web sites as well?


Solution

  • A website becomes a PWA when it uses the PWA APIs. There's no strict technical definition of what a PWA is. It's fair to assume your website needs three things to qualify for being a PWA: you need to be running under HTTPS, you need a Web App Manifest and you need a Service Worker. The Payment requests API requires HTTPS, but that's the only matching requirement here.

    So basically: no, you don't need to have a PWA to use the Payment requests API, but your website will become more PWA-like when you use it.