What is a Lightning invoice?
Bitcoin payment requests within the Lightning Network
A Lightning invoice is a payment request used in Bitcoin’s Lightning Network. It usually appears as a scannable QR-code and contains all the necessary information to send a bitcoin payment from one Lightning-enabled wallet app to another.
Lightning Network invoices (aka “LN invoices”) are how payments are made within the Lightning Network. The Lightning Network is a second-layer on top of the Bitcoin blockchain, which enables real bitcoin transactions to be made faster and cheaper than on “on-chain” transactions. It’s able to do this through a global network of peer-to-peer connections, called “channels,” through which real payments can be routed instantly and privately.
If you’re making a payment or a purchase using bitcoin, including amounts ranging from less than $0.01 to a few hundred or thousand dollars, Lightning is often the fastest and cheapest way to go.
Whenever a transaction is made within the Lightning Network, it’s done using a Lightning invoice. A Lightning invoice is a compact, encoded form of payment instructions, which can be shown as a QR-code for easy sharing and scanning. The QR code is just a representation of the invoice, which is actually a string of alphanumeric characters (letters and numbers) that contain the encoded payment instructions.
The payment process for Lightning typically works like this:
The whole process can be done in a matter of seconds, which is ideal for person to person payments or day-to-day purchases.
Lightning invoices are encoded with the necessary details for making the payment, such as the payment amount, destination, timestamp, and authorization information.
To make a payment with a Lightning invoice, you don’t need to understand the details of the invoice. Your wallet app will decode the information and then prompt you to either confirm or deny the payment amount. Below is an example of a Lightning invoice:
Lnbc2m1pnrjd6epp5xg37tadmcc479dt8c3rqk9mu4p08y8a5uvdd4repy4r8zzs40y4qdqqcqzzsxqrrs0fppqhsrcf2xszcp9nu4xgxzjwx6m3qnvlvrtsp5nft6epu8wxaxytyadq95ygyqvewuhuqh4zw6wevwvufxjr0zc0qq9qyyssqtafnv4cz4uuccg8xfw0ec2lgmr9u23rg85ac86zdnkn4mkq93krn283prlthqky5ujpv8x4cecs4634uu4gcw4f57l3haur8vg6myggp7z6erh
Although it may appear random and complicated, we can break it down.
A few important things to know about Lightning invoices:
So what do all those letters and numbers mean?
Lightning invoices can be broken into two main parts: the human readable part and the data part. These two parts are separated by the character “1” found near the beginning of the invoice.
The human readable part: “lnbc2m”
The data part: all the rest
If someone modifies or makes an error in copying the invoice, the signature will be invalidated. This helps prevent mistakes and manipulation of the information, such as the node ID, payment hash and fallback address, which if they were modified would let someone steal funds.
The structure of Lightning invoices is designed so that payments are robust, flexible, and accommodate various optional features without complicating the payment process. You can read all about Lightning invoices and how they work in the Lightning documentation.
A zero-amount invoice is a type of Lightning invoice that doesn’t specify an amount for the payment. This is a flexible feature that allows the payer to decide how much to send.
Zero-amount invoices are particularly useful for certain situations:
Not all Lightning-enabled wallet apps support zero-amount invoices since they require additional steps of communication between the payer and payee’s wallet apps.
The Strike app is a fully functional Lightning-enabled bitcoin wallet. It lets you receive payments by generating Lightning invoices, including zero-amount invoices, as well as send to any other wallet’s Lightning invoice.
With the Strike app you can also create Lightning invoices for either cash or bitcoin amounts, and the Strike app will receive the funds as you specified.
To receive a bitcoin payment via the Lightning Network, visit your Bitcoin screen and tap the “Receive” button, then “Bitcoin wallet.”
By default, the Strike app will generate a zero-amount Lightning invoice, which is ready to be scanned or can be shared by copying the invoice’s string of characters and sending via instant message or email. You can edit the amount of the invoice by tapping the “Edit” button, which will generate an entirely new invoice to be scanned or shared. Also, the Lightning invoice will have a default expiry time, shown in the top right-corner of the invoice screen.
The process of receiving a cash payment via the Lightning Network follows the same steps as a bitcoin payment, except for a few key differences:
The Strike app also lets users send and receive payments using Lightning addresses, which can be a more familiar and intuitive way of transacting via Lightning.
© 2024 NMLS ID 1902919 (Zap Solutions, Inc.)