Web Payments is a W3C ecosystem that aims to remove the need for checkout forms by integrating standardized payment UIs and APIs across different browsers. Specifically, the payment handler API (still a work in progress) allows us to handle payments using new and custom payment methods, such as the Interledger Protocol (ILP). This is important because with ILP, both the merchant and the customer can now be currency and network agnostic (i.e. they can accept/send payment with whatever currency/network they choose and settle instantaneously through the ILP network).
In this post we will demonstrate how we can register and configure a web payment app in Moneyd GUI, which is a frontend for Moneyd (or your connector).Prerequisites You should be running Moneyd GUI. To set this up please follow this tutorial. You should be using Google Chrome Beta (as mentioned the payment handler API is still a work in progress). You should also enable ‘Web Payments’, ‘Enable web payment modifiers’ and ‘Service Worker payment apps’ in your Chrome flags.
Once you have Moneyd GUI running, you can go to your localhost on port 7770 and click on ‘Wallet Config’ to enable your Moneyd instance to handle Interledger payments requested via the PaymentRequest API.Enabling Web Payments in Moneyd GUI
This essentially registers the Moneyd GUI service worker in your browser to listen for ‘paymentrequest’ events with a payment method of ‘interledger’. When it handles an event it will open a page, hosted by Moneyd GUI, to prompt the user to confirm the payment.Demo on merchant site
Based on a Google payment handler demo and its extension, I will demonstrate how the payment flow will look like after web payments is enabled via Moneyd GUI.Mock merchant website that supports payment through ILP
As shown above, the ‘Buy Now’ button triggers a payment window which lists ILP as a way of payment. When the...