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>