pull down to refresh

Why Developers Should Build on Hold Invoices

If you’re building on the lightning network, Hold invoices* are your secret weapon. They give you powerful control over the final step of a payment—the moment of settlement—which unlocks app behaviors that were previously hard or impossible to build in a trust-minimized way.
Let’s list some use cases enabled by Hold invoices:
157 sats \ 4 replies \ @OT 31 Jul
I learned about hold invoices from Robosats.
Would be nice if more LN wallets had a better UX for it. Often a payment looks like it has failed and produces an error msg when it is in fact working as it should.
Think of Hold invoices as programmable escrow. The buyer locks in a payment upfront, but the seller only gets paid when proof of delivery is exchanged—often just a preimage. No middlemen required.
The middleman is most likely still required in case of a dispute.
reply
42 sats \ 1 reply \ @siggy47 31 Jul
Me too. The first time I used one on Alby for robosats I thought I did something wrong.
reply
36 sats \ 0 replies \ @Alby 31 Jul
Is it better now? What should we do differently?
reply
I try to avoid as much as I can using hold invoices. It can trigger force close for a channel if in the path encounter a bad node forwarder. The concept is cool and useful but we are not at that level where all public nodes routers are reliable and well aware about their job to be done (we still have "balcony nodes" and tor only nodes)
reply
42 sats \ 0 replies \ @k00b 31 Jul
All non-custodial zaps on SN use hold invoices. For most things you pay for non-custodialy on SN, we use hold invoices.1 This ensures we can, trivially, give anyone their money back should something unexpected happen.

Footnotes

  1. there are a few exceptions like paying to post or comment which use regular invoices for logged in users.
reply