The most common way people monetize their websites today is by putting up advertisements. Almost everyone uses Google Adsense, about 29% all websites uses ads and of those sites, 94.9% uses Google Ads. They do it through pay per click advertising. People make about $0.50 USD to $5 USD per click. If your website does not comply with the Google AdSense policies your account could get disabled. The policies can vary depending on your site’s content and you may not even know how exactly or why you’re account got banned. When Google can disable your account for any reason and you are not allowed to dispute it what are your options? You can try something different. Here we will talk more about how you would be able to monetizing your website through Hedera Hashgraph.

Since Hedera has very low transaction costs, it allows you to charge micropayments for clicks and plays without losing half of the payment in fees.

Great. So how do you use it?

Cue the Hedera Browser Extension

Hedera provides this very useful chrome plugin called Hedera Browser Extension. It supports micropayments with almost any website without giving a way your private keys (Much like Ethereum’s MetaMask).

The plugin uses HTML tags to get the information about the transaction as well as request the approval for automatic micropayments. Just imagine the UX nightmare it would be to “approve” every single sub-penny transaction. An automatic micropayment would be something like “pay website 10 tinybars every time I read an article” to pay for the service. This makes it extremely easy to monetize as users can pay fractions of cents per view or click.

Most of the following is taken off of the DailyTimestamp’s codebase and the requests it makes. The DailyTimestamp is a website provided by Hedera to showcase the usability of the network with micropayments (sub-penny transactions).

Initial transaction to mps.dailytimestamp.com

The Hedera Browser Extension uses a gRPC node to make these transactions. It is a simple way to hold your wallet while using a web browser. It works similarly to Metamask where a user can manage their accounts and connect with websites using the transaction signing tool. Currently it connects to a relayer or payment gateway. A relayer works by sending transactions from the client to the hashgraph network (as shown below). The set up is extremely similar to Ethereum’s JSON-RPC functionalities.

Sending a signed transaction to the micropayments server for relaying

How would you use it?

In order to monetize your articles or videos you enclose the object you want charge for through a custom HTML object. In this HTML object we have all the product information required for the chrome plugin to make the transaction happen. You can identify the transaction with a memo, or include some other information about the sender, as well as specify who is to receive the transaction (among other things). Currently its called hedera-micropayment although I expect more to come later as more functionalities get implemented to the codebase(s).

The variables in the DailyTimestamp example

There’s an interesting variable that caught my eye: data-paymentserver. It is actually a javascript implementation of the Hedera SDK that works over socket io. The DailyTimestamp uses a NodeJS micropayment server (MPS) which takes a signed transaction and updates the client with the states.

API calls done by the Chrome plugin to the micropayment server

These states range from “Transaction Initiated”, to “CryptoTransfer” and “Transaction Receipt” to provide clear updates through the Chrome Plugin (Yellow bar).

Yellow bar example

Transaction state update

There are plenty of content types supported by the extension making it really useful as a tool for most virtual download payments.

A lot of this will probably change over the course of this year. Stay connected by signing up on our newsletter

The HTML object code resides in the website as a couple javascript functions and interacts directly with the chrome plugin through the runtime. Here’s a diagram showing how all these pieces interact:

Component Interactions

In conclusion…

We analyzed how the Hedera Chrome Plugin and the DailyTimestamps are connected so we can get a clearer picture about how to handle web micropayments while the SDK’s become fully functional. We are sharing this analysis to help everyone learn more about the best practices with Hashgraph. We believe explaining some of the current implementations will help the community make the right choices during development and provide insight if there are better solutions. Subscribe to our newsletter to hear more about our Hashgraph dev-ing!

Enjoy this article?

Stay up to date! For more Hashgraph insights, feel free to read more of our Medium articles, visit our website, or even join our mailing list. We look forward to connecting with you!