LUD-21: verify base spec.
June 6, 2024 ยท View on GitHub
author: reneaaron
Allow SERVICEs to check whether an invoice has been paid by contacting the LN SERVICE.
A SERVICE can verify a payment was made without access to the user's node. Users can give their LNURL or Lightning Address to a SERVICE and allow the SERVICE to create and verify invoices on their behalf.
This allows users to re-use existing wallets and SERVICEs to facilitate P2P payments without being an intermediary.
LNURL-verify
An optional field verify is added to the callback response:
{
"status": "OK",
"routes": [],
"pr": "lnbc10...",
"verify": "https://example.com/verify/894e7f7e...",
}
The field verify provides an URL to a SERVICE to check if the invoice has been settled:
https://example.com/verify/894e7f7e...
Response
{
"status": "OK",
"settled": true,
"preimage": "123456...",
"pr": "lnbc10..."
}
{
"status": "OK",
"settled": false,
"preimage": null,
"pr": "lnbc10..."
}
or
{
"status": "ERROR",
"reason": "Not found"
}