Introduction to the

Web Monetization API

Mozilla Tech Speakers

Andrzej Mazur@end3rEnclave Games
Tech Speakers Briefing, online, May 21st 2020

June 2019: W3C Games workshop

Discoverability and Monetization

Monetized website

							<!DOCTYPE HTML>
							  <meta charset="utf-8">
							  <title>Flood Escape</title>
							  <meta name="monetization" content="your_payment_pointer">
							  // ...

Real-time money transfer

$5 / month

Detecting active subscribers

Checking the state

							if(document.monetization && document.monetization.state === 'started') {
							  // do something

Listening for an event

							function startEventHandler(event) {
							  // do something
							document.monetization.addEventListener('monetizationstart', startEventHandler);

Extra content

Levels, points, coins, weapons, bonuses, etc...

No advertisements

  • No privacy issues
  • No spying on users
  • No selling data

Full control

  "Classic" publisher Web Monetization
Implementation: Complicated, changing code 1 line of HTML + 2 lines of JS
Income: Waiting months for reports Instant, streamed in real time

Monetize all the things

  • Games
  • Articles (WordPress)
  • Videos (YouTube, Cinnamon)
  • Podcasts
  • Tools
  • Services
  • Anything else on the Web

Go out and

build the future

of the Web!

Ender Efka @end3r