Basic Web Monetization

Get started with Fundme.js.

Fundme.js will add meta tag for Web Monetization API onto your page. If the meta tag already exists, it will update the Web Monetization receiver's payment pointer address instead.

Normal use case for fundme.js is to import function fund() from package fundme you've installed from NPM. The library uses bundler's threesaking feature to minimize its size. Because of that, in case you're not using bundlers' into your web development setup, you need to import fundme.js differently than the usual (see HTML without script module example).

import { fund } from "fundme";

fund("$wallet.example.com/test");

By default, function fund() will take a single string for its parameter and Web Monetization will activated for the payment pointer called. But fundme.js is flexible, as you can use other methods you prefer with more options to control your Web Monetization, such as extending it with Revenue Sharing feature and more!

Last updated