Monetize a PWA
Published
In one line: the Payment Request API is a browser-native checkout mechanism a PWA can use to collect payment, address, and contact information without building a custom checkout form, and it can present payment methods such as Google Pay.
What the Payment Request API does
Section titled “What the Payment Request API does”A page creates a PaymentRequest object in response to a user action (for example,
clicking a “Purchase” button), and the browser handles the exchange of information
with the user while they provide input to complete the transaction. The API is meant
to reduce the number of steps needed to complete an online payment, since many
checkout-abandonment problems trace back to checkout forms that are slow or
difficult to fill out. It is not a new way of paying for things — it is a
consistent, standardized way for a user to select their preferred payment method and
make that information available to the page. It is available only in secure
contexts (HTTPS).
Payment method identifiers
Section titled “Payment method identifiers”A PaymentRequest is created with one or more payment method identifiers, which
determine which payment methods the browser can offer the user. Google Pay is one
such method: integrating it lets a page offer “quick and easy checkout on websites
by leveraging millions of cards saved to Google Accounts,” and after the user
selects a payment method, the Google Pay API returns a payment token to the page.
Where to look next
Section titled “Where to look next”For the API’s OS × browser support matrix, see the Payment Request compatibility data.
← Back to the Guides overview.