You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/blog/2025-09-05-memorable-wallet-addresses-custom-domain.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,17 @@ So, instead of `https://ilp.wallet.example/12345432/usd`, you can have `$mywebsi
18
18
19
19

20
20
21
-
You can change your wallet without telling anyone about a new address. And not to forget the branding that comes with your domain - you can share it with people to request money with Open Payments, and it's handy when sending someone money as well. The [Web Monetization extension](https://github.com/interledger/web-monetization-extension) also supports these custom wallet addresses.
21
+
You can change your wallet without telling anyone about a new address. And not to forget the branding that comes with your domain - you can share it with people to request money with Open Payments, and it's handy when sending someone money as well. The [Web Monetization extension](https://webmonetization.org/supporters/get-started/) also supports these custom wallet addresses.
22
22
23
-
I personally use `$sidvishnoi.com` (which maps to my GateHub wallet). Feel free to send me money now that you remember the address!
23
+
I personally use `$sidvishnoi.com` (which maps to my [GateHub wallet](https://gatehub.net/)). Feel free to send me money now that you remember the address!
24
24
25
25
Alright, so how do we get that address?
26
26
27
27
## Set up custom payment pointer domain
28
28
29
29
Having a domain is a must-have for this to work. If you don't own one, you can use a subdomain provided by your web hosting provider, but your own domain is better.
30
30
31
-
I'll share a few approaches in this article, and later explain how these custom addresses relate to Web Monetization. The essential part in each approach is: you want`https://{yourdomain.com}/.well-known/pay` to either redirect or rewrite to the wallet address you want to alias.
31
+
I'll share a few approaches in this article, and later explain how these custom addresses relate to Web Monetization. The essential part in each approach is to have`https://{yourdomain.com}/.well-known/pay` to either redirect or rewrite to the wallet address you want to alias.
32
32
33
33
### Configure in web host
34
34
@@ -43,7 +43,7 @@ For instance, let's consider Cloudflare. They have a concept of "rules" that exe
43
43
3. In the URL field, enter `{yourdomain.com}/.well-known/pay*`.
44
44
4. In settings, select "Forwarding URL" with a 302 - Temporary Redirect.
45
45
5. In the Destination URL field, write the wallet address your wallet provider gave and type `$1` at the end.\
46
-
e.g., if your wallet address is `https://ilp.wallet.com/abc/zyz`, enter `https://ilp.wallet.com/abc/xyz$1`.\
46
+
E.g., if your wallet address is `https://ilp.wallet.com/abc/zyz`, enter `https://ilp.wallet.com/abc/xyz$1`.\
47
47
The `$1` gets replaced by whatever content was there in place of `*`: `/.well-known/pay/jwks.json` will become `/abc/xyz/jwks.json`; `/.well-known/pay/` will become `/abc/xyz/`.
48
48
6. Click Save Page Rule, and you're ready!
49
49
@@ -96,7 +96,7 @@ Static sites hosted on platforms like Netlify and Cloudflare can utilize this ap
96
96
Access-Control-Allow-Origin: *
97
97
```
98
98
99
-
Other providers like [Surge](https://surge.sh/help/adding-redirects),[Vercel](https://vercel.com/docs/redirects) may have their own syntax for the redirects file.
99
+
Other providers like [Surge](https://surge.sh/help/adding-redirects) and[Vercel](https://vercel.com/docs/redirects) may have their own syntax for the redirects file.
100
100
101
101
### Dynamic rewrite/redirect from website
102
102
@@ -155,7 +155,7 @@ You cannot have `$mywebsite.com`, but `$mywebsite.com/pay.json` may work. It mig
155
155
In case you're wondering, no, the [`http-equiv` HTML meta tag](https://stackoverflow.com/a/5411567) based redirect won't work. The redirects have to be at HTTP-level.
156
156
157
157
1. Grab the JSON response for your original wallet address.\
158
-
You can use online services like [https://jsonviewer.stack.hu](https://jsonviewer.stack.hu), or [https://hoppscotch.io](https://hoppscotch.io) to view the JSON response, or use `curl` if you're into those things.\
158
+
You can use online services like [https://jsonviewer.stack.hu](https://jsonviewer.stack.hu) or [https://hoppscotch.io](https://hoppscotch.io) to view the JSON response, or use `curl` if you're into those things.\
159
159
Opening the wallet address URL directly in your browser may not show you the JSON response, as some wallets use it as a landing page for others to send you money.
160
160
2. Create a `pay.json` file (or use any other name, it just needs to have the `.json` extension), and paste in the above JSON. For example:
161
161
@@ -171,7 +171,7 @@ In case you're wondering, no, the [`http-equiv` HTML meta tag](https://stackover
171
171
172
172
Note that, given the lack of control over headers, you may face CORS issues as explained above, but it'll work with most other Open Payment uses.
173
173
174
-
More importantly, you will have to ensure the content of your `pay.json` matches the JSON response that was received from your original wallet address, in case it changes in future.
174
+
More importantly, you will have to ensure the content of your `pay.json` matches the JSON response that was received from your original wallet address, in case the response changes in future.
175
175
176
176
## How does it work with Web Monetization
177
177
@@ -187,7 +187,7 @@ If you're using the same domain as your website, you can use the link element's
187
187
<linkrel="monetization"href="/.well-known/pay" />
188
188
```
189
189
190
-
Aside: During local development (i.e. with localhost or custom dev domain), if you have the Web Monetization browser extension installed and are using a CDN or host-level configuration, the extension won't resolve to your actual wallet address, and no real money will be sent during regular website development, which can be very handy. And when you want to actually test Web Monetization integrations, you can resolve the URL to a different [test wallet](https://wallet.interledger-test.dev/) address!
190
+
Aside: During local development (i.e. with localhost or custom dev domain), if you have the Web Monetization browser extension installed and are using a CDN or host-level configuration, the extension won't resolve to your actual wallet address. No real money will be sent during regular website development, which can be very handy. And when you want to actually test Web Monetization integrations, you can resolve the URL to a different [test wallet](https://wallet.interledger-test.dev/) address!
191
191
192
192
### Usage in extension
193
193
@@ -201,7 +201,7 @@ Aside: The Web Monetization API doesn't allow the websites to know what payment
201
201
202
202
Let's say, instead of using a wallet address that our provider gave us, we alias it to a custom address as shown above, and add it to our webpage. This sort of indirection can also arise from using the [probabilistic revenue sharing generator](https://webmonetization.org/tools/prob-revshare/), or from your wallet provider may be using an aliased wallet address itself.
203
203
204
-
When a `monetization` event is emitted, how do we know what wallet address was actually used? And how do we know what wallet address we originally provided? This is even more relevant if your webpage includes multiple monetization link tags.
204
+
When a `monetization` event is emitted, how do we know what wallet address was actually paid? And how do we know what wallet address we originally provided? This is even more relevant if your webpage includes multiple monetization link tags.
205
205
206
206
Thankfully, the `MonetizationEvent` includes both these details!
0 commit comments