Redirected payment pointers

Hi,

As a end-user, say I wanted to use a shorter payment pointer for web monetization. E.g.

<meta name="monetization" content="$example.com">

What would be required to point this to the payment pointer provided by my wallet provider?

Is HTTP 302 redirecting https://example.com/.well-known/pay to https://pay.stronghold.co/<myaccounthash> enough?

The specification is not actually specific on this so it will really depend on the client.

ilp-protocol-spsp is the reference client and uses node-fetch which will follow redirects by default so I’d say the answer is YES.

I’ll update the spec to reflect this

Thanks for the clarification! Remember to specify the max number of redirects and that the whole redirect-chain must use HTTPS.

Update: Oh, and 301 permanent can be cached whereas 302 shouldn’t be cached longer than cache-control:max-age=sec response header allows. HTTP basics but people don’t know these things.

I’ve deployed this redirected short-form payment pointer on my blog. Hopefully it will still work with Coil.

There’s less data and a lot less unique data in a short-form payment pointer that matches the site’s domain compared to the full payment pointer from Stronhold. Switching from one to the other shaved off an average 2,97% of the total compressed filesize for my webpages.

Please let me know if anyone encounters issues with my redirected short-form vanity payment pointer. (Or if the spec changes so this no longer works.)