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
Specification |
---|
Web Monetization API #receipt-attribute |
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 | |
receipt | 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