Monetization interfaces
 Web Monetization API
   
   
 
   The Web Monetization API consists of two interfaces: MonetizationEvent and MonetizationCurrencyAmount.
MonetizationEvent
Section titled “MonetizationEvent”The MonetizationEvent interface describes the monetization event that fires when an outgoing payment is successfully created.
| Bubbles | Yes | 
|---|---|
| Cancelable | No | 
| Event handler property | onmonetization | 
By listening for monetization events, you can use the information returned in the following properties to verify payments.
| Property | Description | 
|---|---|
| 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 wallet address or payment pointer that the incoming payment request was sent to. | 
Visit the Monetization events page for more information.
Specification
Section titled “Specification”| Specification | 
|---|
|    Web Monetization #monetizationevent-interface |  
MonetizationCurrencyAmount
Section titled “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. An ISO 4217-compliant currency code, when possible, that represents the currency that was sent. For example, USD (for US dollar) or GBP (for Great Britain Pound).
 
The MonetizationCurrencyAmount interface is modeled on the Payment Request API’s PaymentCurrencyAmount dictionary.
Specification
Section titled “Specification”| Specification | 
|---|
|    Web Monetization #monetizationcurrencyamount-interface |