Skip to content

Conversation

@sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Oct 27, 2025

PR Checklist

  • Linked issue added (e.g., Fixes #123)
  • If blog post was added:
    • Ensure images have been optimised
    • Update dates to reflect the actual publishing date when merged (file names, folder names, and frontmatter)

Summary

I'm writing a 3-article series on how Web Monetization uses Open Payments. This is first article in the series.
I anticipate the second one to be ready this week.

@sidvishnoi sidvishnoi marked this pull request as ready for review October 27, 2025 16:06
@sidvishnoi sidvishnoi force-pushed the sidvishnoi/wm-ext-op-part-1 branch 4 times, most recently from c969584 to a55bf35 Compare October 28, 2025 10:11
@sidvishnoi sidvishnoi force-pushed the sidvishnoi/wm-ext-op-part-1 branch from a55bf35 to 86bad07 Compare October 28, 2025 10:13
@DarianM
Copy link
Member

DarianM commented Oct 28, 2025

Top quality information. Indentation looks good to me


A browser extension consists of several key components. The pop-up is the user interface that appears when users click the extension icon in the browser's toolbar. The pop-up is typically the main interface that users interact with. In the Web Monetization extension, you will first use this pop-up to enter your wallet address and set a budget for the wallet connection process. Later, you can check a website's monetization status and send one-time payments there.

The background script (also known as the background service worker) functions as a secure backend server within your browser. It coordinates activities and securely stores sensitive data, such as payment information, away from the web pages. The Open Payments bits of the extension are live here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to call out the use of 'live' at the end of the sentence. It's a heteronym, so I wasn't sure if you meant "...bits of the extension live here" or as it's written. Both are fine :)


The standard Open Payments Node.js SDK, as the name suggests, is designed specifically for a Node.js environment. Getting it to work within a browser extension requires addressing a couple of key differences.

The first hurdle is that the SDK relies on crypto modules specific to Node.js. To make it functional in the browser environment, we must polyfill these dependencies. The `crypto-browserify` npm package works well for this use.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crypto modules?! Web Monetization is a crypto thing? (Kidding, but maybe the first usage should be expanded to cryptography juuuust to be clear.)


To control spending, you can set a budget in your wallet's currency. This budget represents the maximum amount the extension is allowed to spend on your behalf.

The extension assists you by fetching [default budget recommendations from our data store](https://github.com/interledger/web-monetization-budget-suggestions) for that currency. If no specific recommendation is available, it converts a generic $5 USD equivalent to serve as a sensible default. You can always define your own budget.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The extension assists you by fetching [default budget recommendations from our data store](https://github.com/interledger/web-monetization-budget-suggestions) for that currency. If no specific recommendation is available, it converts a generic $5 USD equivalent to serve as a sensible default. You can always define your own budget.
The extension assists you by fetching [default budget recommendations from our data store](https://github.com/interledger/web-monetization-budget-suggestions) for that currency. If no specific recommendation is available, it converts a generic $5 USD equivalent to serve as a sensible default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest removing last line as it repeats the first line of the previous paragraph.


The extension assists you by fetching [default budget recommendations from our data store](https://github.com/interledger/web-monetization-budget-suggestions) for that currency. If no specific recommendation is available, it converts a generic $5 USD equivalent to serve as a sensible default. You can always define your own budget.

Additionally, the system provides a default rate of pay fetched from our data store, which limits how quickly funds can be spent.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the user adjust this?

In case your account balance temporarily falls below your budget, payments will fail. The extension can seamlessly resume spending from the same grant once you add new funds.

You can choose to set your budget for automatic monthly replenishment. When you enable this option during wallet connection, the extension creates a recurring grant by adding an interval parameter to the grant request. This grant will automatically reset your spending limit each month, allowing you to spend up to your chosen amount without requiring a new approval each time your previous funds are utilized. Remember, the monthly limit is just an upper boundary; any remaining budget at the end of the cycle will stay in your wallet.\
If you choose to opt out of this monthly renewal option, the grant will eventually run out of funds, and you will need to manually approve a new grant to continue receiving payments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you choose to opt out of this monthly renewal option, the grant will eventually run out of funds, and you will need to manually approve a new grant to continue receiving payments.
If you choose to opt out of this monthly renewal option, the grant will eventually run out of funds, and you will need to manually approve a new grant to continue sending payments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants