HTMLElement: monetization
The monetization
event is fired on a <link rel="monetization">
element when a Web Monetization payment has successfully happened on the associated payment pointer.
Bubbles | Yes |
Cancelable | No |
Interface | MonetizationEvent |
Event handler property | onmonetization |
The monetization
event fires after a Web Monetization payment has been successfully received by the payment pointer, and the confirmation has been sent back to the browser.
Examples
<link rel="monetization" href="https://example.com/pay" />
<script>
const link = document.querySelector('link[rel="monetization"]')
link.addEventListener('monetization', (event) => {
console.log('Web Monetization payment received!')
})
</script>
Specifications
Specification |
---|
Web Monetization API #onmonetization-event-handler |
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 | |
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