Web Monetization API
The Web Monetization API provides a seamless payment experience for site owners and visitors. Unlike the W3C's Payment Request API, the Web Monetization API sends continuous micro-payments from the user agent to the website. Thus, visitors automatically send a small sum per time unit to any Web Monetized website they visit. The payment rate is predetermined by the user's Web Monetization agent and adapts over time.
Web Monetization Concepts and Usage
The Web Monetization API allows web apps to accept continuous micro-payments from users. There are two components to this API:
The Web Monetization Agent is designed to be implemented in browsers and expose the Web Monetization API. It's responsible to:
- get the rate, token, and payment connection address from the Web Monetization Provider
- get the payment information from the
<link>
element - create an incoming payment via the Open Payments API
- verify payment via the outgoing payment endpoint on the web site owner's payment pointer via the Open Payments API
The Web Monetization Provider is intended to be the entity that facilitates payments to websites on behalf of the user. It's designed to be side-loaded via an extension, essentially allowing users to choose their provider by installing a different extension. It would only be responsible for offering the browser information about the rate, token, and provider address. Ideally, there would be a separate extension category for Web Monetization Providers. A website visitor can also potentially be their own Web Monetization Provider through the use of a digital wallet that implements the Open Payments API standard.
Currently, the Agent and Provider are loaded via the same extension until the Web Monetization Agent is implemented in browsers.
Interfaces
An event object that contains all of the attributes of a successful web monetization event.
Basic example
<link rel="monetization" href="https://example.com/pay" />
Guides and tutorials
A tutorial on how to show Web Monetized viewers exclusive content.
A guide on removing ads for Web Monetized viewers.
Calculate how much you made from a Web Monetized visitor.
A guide on revenue sharing amongst multiple payment pointers.
Specifications
Specification |
---|
Web Monetization API |
Browser compatibility
desktop | mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on iOS | Samsung Internet | Puma Browser | |
Web Monetization | Yes | Yes | Yes | No | Yes | No | No | No | No | No | No | No | Yes |
- Full Support
- No Support
- You'll need to use a Web Monetization Extension