SouthXchange logo
SouthXchange logo

All articles

Can a payment through Lightning Network be proved?Updated 3 years 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:

  1. Extract the payment hash from the Lightning invoice. You can use any invoice decoding tool, for example:
  2. 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: (enter in "Binary hash")
  3. 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?