Add your meta tag into the <head> section of your website. You can find your meta tag in Settings > Monetize Content
<meta name="monetization" content="$your.payment.pointer.address/xxx">
Now that your content is monetized you can trigger events based on whether money is streaming or not. Check out the example below.
Web Monetization allows websites to request payment from a user, via the browser
for the website to tell the user agent (i.e. browser or a browser extension) how to pay it
that specifies where to send the payment
for the user agent to tell the website when (and how much) it has paid
This means that the websites can react to payments in real time by doing things like disabling ads, displaying a thank-you message, or unlocking bonus content.
Interledger is a payment messaging protocol for making payments of any size (and, significantly, supports “micropayments” of fractions of cents) that can be aggregated and settled over existing payment networks (which include financial institutions, Visa/Mastercard, etc.). Web Monetization providers and receivers use the Interledger protocol to exchange payments. Learn more »
The user agent is looking for the Web Monetization meta tag in the head of the website.
The browser exposes the document.monetization DOM object that implements EventTarget and has a read-only state property. The object allows you to track Web Monetization events and see whether the user visiting your page is web monetized and if so, show them exclusive content.
What happens behind the scenes when a user navigates to a site that includes a Web Monetization <meta> tag?
The browser (user agent) parses the tag to determine where to send payments and calculates the appropriate rate of payment.
The browser fetches a unique destination address and shared secret for the session from the Web Monetization receiver.
The browser asks the user's Web Monetization provider to stream payments.
The Web Monetization provider sends the payment to the receiver and then notifies the browser of successful payment.
The browser, in turn, dispatches an event that informs the website of the payment.
If the site's backend system is enabled to process Web Monetization Receipts then the browser will include receipts in the events that it dispatches to the page. The site can then submit those receipts to its backend to securely validate that payment occurred.