Saltearse al contenido
Web Monetization logo Web Monetization
GitHub

amount

Esta página aún no está disponible en tu idioma.

The MonetizationEvent amount attribute returned the amount of money that was successfully received on the last payment.

Value

An integer representing the amount of money received.

Example

<link rel="monetization" href="https://wallet.example/alice" />
<script>
const link = document.querySelector('link[rel="monetization"]')
link.addEventListener('monetization', (event) => {
// See how much your received and in what currency
const { amount, assetCode, assetScale } = event
console.log(
`Browser sent ${assetCode}${amount / Math.pow(10, assetScale)}.`,
)
})
</script>

Specifications