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
So far the middleware required the preimage as payment proof in the second request.
But since PR #24 invoice metadata is stored in the DB, with the invoice ID being used as the key, so now we could also just accept an invoice ID and look up the status in the DB or check the settlement on the LN node.
This would make it much easier to implement clients that don't have access to the preimage. For example: Let's say the API is used on a website, but without automated payments via an LN node operated by the people running the website, and instead the website shows the user a QR code so he can pay for the API usage.
Up until now the website had to ask for the preimage. This is an extra step in itself, but even worse, if the user paid via mobile wallet, but browsed the website via desktop PC, he now had to get the preimage from his smartphone to the PC just to proof that he made the payment.
When the invoice ID is enough, the user doesn't have to input anything. The website can decode the LN invoice and take the invoice ID, show the user the QR code and a button "next"/"continue" or "paid", and then the website can just send the request with the invoice ID.
One example of such a website is https://lightning.ws, where the deployed APIs have a "Try out" section where the user has to do exactly the steps mentioned above.
The text was updated successfully, but these errors were encountered:
So far the middleware required the preimage as payment proof in the second request.
But since PR #24 invoice metadata is stored in the DB, with the invoice ID being used as the key, so now we could also just accept an invoice ID and look up the status in the DB or check the settlement on the LN node.
This would make it much easier to implement clients that don't have access to the preimage. For example: Let's say the API is used on a website, but without automated payments via an LN node operated by the people running the website, and instead the website shows the user a QR code so he can pay for the API usage.
Up until now the website had to ask for the preimage. This is an extra step in itself, but even worse, if the user paid via mobile wallet, but browsed the website via desktop PC, he now had to get the preimage from his smartphone to the PC just to proof that he made the payment.
When the invoice ID is enough, the user doesn't have to input anything. The website can decode the LN invoice and take the invoice ID, show the user the QR code and a button "next"/"continue" or "paid", and then the website can just send the request with the invoice ID.
One example of such a website is https://lightning.ws, where the deployed APIs have a "Try out" section where the user has to do exactly the steps mentioned above.
The text was updated successfully, but these errors were encountered: