Skip to main content

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.

BubblesYes
CancelableNo
InterfaceMonetizationEvent
Event handler propertyonmonetization

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

Browser compatibility