Skip to main content

MonetizationEvent.receipt

Caution

Receipts are deprecated. Please consider using the incomingPayments property of the MonetizationEvent interface instead.

The receipt property of the Monetization Event interface returns an optional proof-of-payment receipt. It is issued by the monetization receiver for the monetization provider as proof of the total current amount received in the stream.

Value

A base64-encoded STREAM receipt. Returns null if receipts are not enabled on the payment pointer. The receipt has the total running amount streamed in the current session.

Examples

<link rel="monetization" href="https://example.com/pay" />
<script>
const link = document.querySelector(“link[rel=‘monetization’]);
link.addEventListener(“monetization”, (event) => {
console.log(event.receipt)})
</script>

Specifications

Browser compatibility