lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

[Feature] LUD-09: successAction field for payRequest missing

Open AxelHamburch opened this issue 7 months ago • 7 comments

Feature description

Can it really be that the Alby Extension does not support LUD-09? 🤯

I use LNURLpay with successAction Message and URL. E.g. for offline payments, where the payer is shown a secret pin from the server and wanted to use the URL function now to make a secret Telegram group accessible as soon as the user pays a ticker 🎟️ of 10 Satoshi. Just a spam protection. The browser extension pays the ticket without any problems, but does not provide me with the link to the Telegram group.

Describe the solution

Spam protection is valuable and worthwhile. I would be happy if Alby would integrate LUD-09.

AxelHamburch avatar Apr 26 '25 18:04 AxelHamburch

Thanks for reporting! I think we should support that since long ago, can you maybe provide the LNURL to reproduce this problem?

reneaaron avatar Apr 28 '25 09:04 reneaaron

You can test it here, click on the link: ticket 🎟️

https://ereignishorizont.xyz/en/bitcoinswitch_en/#6_Summary

The ticket is for the bitcoinSwitch DACH group, which costs 10 Satoshi.

The Alby extension accepts the payment, but does not redirect or display anything. There must be a URL that you can click on. By the way, Alby Go works, but not the extension. I can't find anything in the payment history either.

AxelHamburch avatar Apr 28 '25 16:04 AxelHamburch

I see, thanks for sharing. The problem here is that the link automatically triggers the prompt to pay (which is automatically closed after the payment was successful).

If you copy+paste the LNURL to your extension everything works as intended: Image

Not sure if we can change this behavior for these types of situations.

cc @pavanjoshi914

reneaaron avatar Apr 29 '25 12:04 reneaaron

Here you can find an even cheaper test button for Satoshi. https://ereignishorizont.xyz/tickettest/

And these are the parameters behind it. It is a function of LNbits Pay Link.

AxelHamburch avatar Apr 29 '25 15:04 AxelHamburch

Ok, but he won't do that. He will press the button, confirm the payment and then expect a URL to be displayed, right?

AxelHamburch avatar Apr 29 '25 15:04 AxelHamburch

@AxelHamburch I totally understand your point, it's just a question of how hard it will be to change the behavior of these prompts.

@pavanjoshi914 Do you think there is a way to keep these prompts open if there is a successAction? We're using the webln.lnurl() method in the inpage script, which ends up here:

https://github.com/getAlby/lightning-browser-extension/blob/b89fd269485af9c226315a0d283f1f374cfc78a5/src/extension/background-script/actions/lnurl/index.ts#L33

reneaaron avatar Apr 30 '25 09:04 reneaaron

We currently resolve the promise immediately once the payment is successful. However, if we delay the resolution to show the successAction (e.g., a URL) in the prompt, there’s a risk: the user might manually close the prompt, which would reject the promise and lead to inconsistent states.

Rather than introducing a partial or fragile solution, we’ve decided to wait for broader implementation support and more concrete demand for this feature. In the meantime, clients can guide users to complete LNURL payments via the Send tab if they want to ensure the successAction is visible.

pavanjoshi914 avatar May 26 '25 09:05 pavanjoshi914