Understanding Lightning Network Invoices

An invoice on the Lightning Network is a payment request created by the recipient.

 

The party requesting payment, known as the “payee,” generates an invoice that includes key information: the requested payment amount in Bitcoin, an associated payment hash, and a unique payment identifier.

 

It is a long string of characters that always start with lnbc1. Invoices can also be represented as QR codes.

 

Here’s a step-by-step breakdown of how payments happen using invoices:

 

The payer uses their Lightning wallet to initiate a payment by creating an HTLC (Hash Time-Locked Contract) that includes the payment hash associated with the invoice.

 

This HTLC ensures that the payment can only be unlocked if the correct preimage is revealed, which is a technical way of saying that an HTLC ensures that the payment amount reaches the intended recipient.

 

If the sended and the recipient are not directly connected, the payment is routed through intermediary nodes in the Lightning Network. These intermediaries use onion routing to relay the payment while preserving privacy.

 

Once the payment reaches the intended payee, they have to reveal the preimage associated with the payment hash to unlock the funds. This preimage should match the secret value they kept when creating the invoice.

Upon successful verification of the preimage, the payment is considered settled, and the invoice is marked as paid. The payer’s Lightning wallet receives confirmation of the completed payment.

Discover how Bringin can help you seamlessly sell and spend Bitcoin Instantly from any wallet. Start making your Bitcoin transactions easier, quicker, and more cost-effective with Bringin

en_USEN