lnbits
lnbits copied to clipboard
LNURLp does not check the return value of webhook call
One can configure webhook URL to trigger when payment is made on LNURLp. The URL is called but the return code (expected 200 all being well) is not checked, which means that is the URL is erroneous or the server down it happens silently (the payment has not triggered what the user paid for).
What should LNbits do if the target server is down?
Propagate the code of the response from the server. If server not reachable -> 500 (mean there was a server-side error — think of something like the database server going down or perhaps running out of disk space, whatever).
(No appropriate code is like passing hot potatoe without following up that all went well 🙏)
Propagate to where? This is an asynchronous job. There will be no one to read.
But I thought we were storing at least the status code along with the payment.
Closed for inactivity!