This is a more detailed follow-up on Interledger Protocol Payment Pointers (ILP3). Specifically, I’ll talk about how to take a long and unruly ILP3, like the one you get from most wallet services, and turn it into a shorter and more memorable vanity ILP3.
Web Monetization is a proposed scheme to standardize a method for creators and websites to get paid for their content. It’s meant as an alternative to the much-criticized web-advertising ecosystem where people can micro-pay the websites they visit instead of viewing ads. I discussed the proposed Web Monetization API standard and “streaming payments” in a more detailed earlier article.
The new Web Monetization API needs participating webpages to include a unique ILP3 address in a
<meta> element. The required element looks something like this:
The ILP3 is a URL where the
https:// prefix has been replaced by a
$ character (presumably for marketing purposes). The requirement to use a dollar sign may be seen as an unwanted Americanization outside markets that use it as their currency. Furthermore, URLs don’t belong in <meta> elements but I’ll not die on that hill.
The ILP3 is intended for Web Monetization-enabled services like Coil and other Web Monetization API implementations. No one will ever see the ILP3 itself. However, that doesn’t mean you can’t have fun with setting up a short vanity address using your domain!
All you need to set up your short-form ILP3 is a domain name, an HTTPS-ready web server, and you’ll need to set up a redirect. HTTPS is an absolute requirement by the ILP3 standard.
ILP3 without a path component is resolved by looking up ILP3’s Well Known URI (RFC 8615) path at
/.well-known/pay. This path can be redirected from your domain to the ILP3 given to you by your wallet provider (e.g. Uphold or XRP Tip Bot).
E.g. the ILP3 for this blog is
$www.ctrl.blog which redirects to
The following example is how the redirect is created in the Apache Web Server:
Note the use of a temporary redirect because as we all know: permanent redirects are supposed to be permanent. You’ll want to keep your options open in case you change your mind and want to use another wallet provider in the future.
The original ILP3 contains a sequence of unique characters and doesn’t compress well. Switching out my wallet provider’s Payment Pointer with my shorter version saved on average 40 bytes from each page. In other words, 75% of the original ILP3 URL doesn’t get any smaller when compressed.
To give some context to those numbers: Shortening the ILP3 in my HTML pages saves over 50 % more bytes used for page metadata than the much more complicated method I discussed in a recent article on HTML metadata compression optimization.
Redirects, as they always do, adds cost in terms of added latency. Increased latency will delay the start of streaming payments from Web Monetization services like Coil. This added latency means you risk impacting your Web Monetization earnings unless your entire web stack is up to the task and can deliver hyper-fast DNS resolution, server connections, and request responses.
There are some benefits to controlling your published ILP3 address, though. You can change the redirect in the future and have it take effect even when it has been republished through a third-party web cache (like AMP or Internet Archive) or a distributed cache (like Dat or IPFS).