author: andreneves discussion: https://github.com/fiatjaf/lnurl-rfc/pull/50
Support for LNURL-pay comment
This allows for aWALLET to pass a custom comment property to a SERVICE that accepts it. This can have multiple use-cases. Better donation flow is an easy one to visualize. The entity donating gets to send a message, whether their name/contact/random text and the issuer gets paid to read/voice/receive that message, for example, streamers.
This is completely additional/ad-hoc, so current implementations are not affected by this. Any services and wallets that wish to support it do need to add some more business logic.
Service-side
SERVICE must alter its JSON response to the first callback to include a commentAllowed field, as follows:
commentAllowed should be the number of characters accepted for the comment query parameter on subsequent callback. (Should be interpreted as 0 if not provided).
Wallet-side
Upon seeing a positivecommentAllowed attribute on the response from the SERVICE, a WALLET must display a text input where user can enter a comment string (max character count is equal or less than commentAllowed value) along with the other LNURL-pay metadata (text and image).
After gathering input from the user, WALLET must include the comment in its second callback to SERVICE:
Note on comment length
GET URL’s accept around ~2000 characters for the entire request string. Thereforecomment can only be as large as to fit in the URL alongside any/all of the properties outlined above.