WebMonetization Example #1

WebMonetization is a JavaScript browser API that allows the creation of a payment stream from the user agent to the website

Learn more »

Check if browser is enabled

Using "isBrowserEnabled()" function

Verify State

Using "getMonetizationState()" function

Start webmonetization

Using "start()" function. After pressing the button, verify that the "meta" tag associated with monetization exists.

Check if monetization is in pending state

Using "isPendingState()" function

Check if monetization is in started state

Using "isStartedState()" function

Check if monetization is in stopped state

Using "isStoppedState()" function

Check if monetization is in undefined state

Using "isUndefinedState()" function

Change pointer in meta tag

Using "changePointer()" function

Check total amount from current user.

Using "getTotalAmountFromCurrentUser()" function

Get the scale

Using "getScaleFromCurrentUser()" function

Get the current pointer

Using "getCurrentPointer()" function

Get the asset code for payment from current user.

Using "getAssetCodeFromCurrentUser()" function

Stop webmonetization in this browser

Using "stop()" function