Webmonetizer-js
A Web Monetization library.
npm install webmonetizer-js
What is Web Monetization?
Web Monetization is a proposed API standard that allows websites to request a stream of very small payments from a user. Read more on Web Monetization here.
What is Webmonetizer-js?
Webmonetizer-js
is a library that provides a quick and easy way to add Web Monetization to your web apps.
Quickstart
Add Web Monetization to your first application by following the quickstart guide.
Example use:
import React Component from 'react';import WebMonetizer from 'webmonetizer-js' const webMonetizer = "PAYMENT_POINTER"; { ; thisstate = monetizationState: null total: null currency: null payments: } { webMonetizerstate; webMonetizernewPayment; } { webMonetizer; } { webMonetizer; } { const monetizationState currency total payments = thisstate; return <div> <div> <h4>Monetization {monetizationState}</h4> <h4> {currency} total</h4> <div> <button =>Start</button> <button =>End</button> </div> <h3>Payments</h3> <ol> payments </ol> </div> </div> } ;
You can also use webmonetizer-js
in a Typescript codebase:
;; ; ;
webmonetizer-js
can also be used in Vanilla JS:
Monetization State => Total => Start Stop Payments