BitcoinDesign / Guide

A free, open-source community resource for designers, developers and others working on non-custodial bitcoin products.
https://bitcoin.design/guide/
Other
455 stars 98 forks source link

Consider best practices for verifying lightning payments #1013

Open GBKS opened 1 year ago

GBKS commented 1 year ago

We may have some content on this already, but this would be good to review and have clear guidelines for. Based on this Twitter thread/request.

paulosacramento commented 1 year ago

I read the Twitter thread but didn't really understand what he is proposing. Could you explain it to me? I'm writing about receipts for payments at the moment. So this really interests me.

GBKS commented 1 year ago

Let's take a look at the thread:

The buyer sent them a preimage as proof of payment and they didn't know what to do with it.

So the buyer seems to be savvy and understand what the preimage is, but the merchant doesn't. Maybe sharing the preimage can be improved. Like a "Share payment confirmation" button that includes a line of text and link to explain what it is, so the merchant has a starting point.

I asked them to hash the preimage, pull up the original invoice, extract its payment hash, and verify it matches the preimage hash. Then they didn't know what that meant...

I would also not know how to do this. Ideal scenario is something like that the payment proof is some type of link the merchant can click, the wallet opens, checks against the payment history and pulls up the matching one with a "Payment confirmed" message or so. A wallet user should not have to extract payment hashes, etc, that should be done automatically for them. I don't think there is a URL specification for payment proofs. So one option could be that the wallet automatically checks the clipboard on open to check for preimages. A third option could be that the transaction history includes a '...' button with extra options including a "Verify payment" one that explains the process and allows for pasting in a preimage.

That's my understanding at least 😀

paulosacramento commented 1 year ago

Ok, now I get it. Thanks! I'm working on something about the subject of designing receipts for payments, based on the research I've done in Brazil. I will come back with more concrete suggestions as soon as I can.