author: rossdyson author: akumaigorodski discussion: https://t.me/lnurl/256
Standardization of the successAction field
This defines a field successAction returned by the SERVICE along with the payment request in the second callback.
It must be stored by the WALLET and shown to the user as soon as a payment succeeds.
To implement this, a SERVICE must alter its JSON response to the second callback to include it like the following:
LNURL-pay flow change
AWALLET that decides to implement this scheme must, after a payment is complete and a successAction is present, show a popup or screen to the user with the contents of that successAction.
For message, a toaster or popup is sufficient. For url, the wallet should give the user a popup which displays description, url, and a ‘open’ button to open the url in a new browser tab.
WALLET should also store successAction data on the transaction record.
Support for successAction types
Since other successAction types can be added in the future, if a successAction is present in the response from SERVICE, a WALLET must make sure that its tag value is of a kind it supports, otherwise it must not proceed with the payment — or the user might end up paying and not seeing its expected successAction.