Can a payment through Lightning Network be proved?Updated a year ago
A confirmed Lightning Network withdrawal will include the preimage in the hash field. The preimage is a secret value that is generated by the receiver (the node that generated the invoice). This value remains secret until the payment is received. The receiver must reveal this value to collect the payment. That is, a sender can prove a payment was delivered correctly by showing the payment preimage.
Follow these steps to make sure the preimage matches the payment:
- Extract the payment hash from the Lightning invoice. You can use any invoice decoding tool, for example: https://lndecode.com/
- Take the preimage ("hash" field) displayed in SouthXchange and calculate its SHA256 in hex/binary format (not in text format). You can use any tool for this purpose, for example: https://www.fileformat.info/tool/hash.htm (enter in "Binary hash")
- Compare the SHA256 of the preimage calculated in item 2 with the payment hash in item 1. If they match then the proof is complete.
Was this article helpful?