Skip to content
Web Monetization logo Web Monetization
GitHub

Monetization interfaces

Web Monetization API

The Web Monetization API consists of two interfaces: MonetizationEvent and MonetizationCurrencyAmount.

MonetizationEvent

The MonetizationEvent interface describes the monetization event that fires when an outgoing payment is successfully created.

BubblesYes
CancelableNo
Event handler propertyonmonetization

By listening for monetization events, you can use the information returned in the following properties to verify payments.

  • amountSent - The currency amount and code of the sent payment. Contains two variables, value and currency, constructed by the MonetizationCurrencyAmount interface.
  • incomingPayment - A URL you can use to determine if a payment was received and, if so, the amount received.
  • paymentPointer - The URL of the payment pointer or wallet address that the incoming payment request was sent to.

Visit the Monetization Events page for more information.

// ## 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
MonetizationEvent
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

Specifications

MonetizationCurrencyAmount

The MonetizationCurrencyAmount interface is used to populate the value and currency variables contained within the MonetizationEvent amountSent property.

  • Value - The amount. A valid decimal monetary value containing the amount that was sent.
  • Currency - The currency code. A well-formed 3-letter ISO4217 code that represents the currency that was sent, such as USD or GBP.

The MonetizationCurrencyAmount interface is modeled on the Payment Request API’s PaymentCurrencyAmount dictionary.

Specifications