A Lightning invoice is a payment request with the amount, payment hash, expiry and routing hints. Learn how BOLT 11 invoices and BOLT 12 offers work.
A one-time payment request
To get paid, the receiver creates an invoice, usually shown as a QR code. A BOLT 11 invoice on mainnet starts with lnbc.
| Inside an invoice | Why |
|---|---|
| Amount | What to pay (optional) |
| Payment hash | The HTLCs: hash time-locked contracts lock: hash of the receiver's secret |
| Expiry | Often 1 hour by default in many wallets |
| Description | What it's for |
| Node ID and route hints | Help the sender find a path |
| Signature | Proves the invoice came from that node |
Use once
Each BOLT 11 invoice has one payment hash. Paying the same invoice twice risks the second payment being taken by intermediaries who saw the secret. Wallets refuse to pay an invoice twice.
Reusable options
- BOLT 12 offers: a static code; the payer's wallet fetches a fresh invoice each time over Lightning. More private and reusable.
- Lightning addresses (name@domain): a web convention that fetches a fresh invoice from a server.
Invoices aren't addresses
An on-chain address can receive many times. A BOLT 11 invoice is a single request with a deadline.
Reading an invoice prefix
| Prefix | Network | Example amount part |
|---|---|---|
| lnbc | Bitcoin mainnet | lnbc2500u = 2,500 µBTC |
| lntb | Testnet | |
| lnbcrt | Regtest |
The letters after the amount mean m (milli), u (micro), n (nano) or p (pico) bitcoin.
Never reuse a paid invoice
Wallets block this for you. If someone asks you to pay "the same invoice again", ask for a new one.
Key takeaways
- A Lightning invoice includes amount, payment hash, expiry and a signature.
- BOLT 11 invoices are single-use.
- BOLT 12 offers and Lightning addresses are reusable.
Common questions
Why did my invoice expire?
Invoices have an expiry, so routes and exchange rates stay current. Create a new one.
Can a Lightning invoice receive on-chain?
Some wallets include an on-chain fallback address, but the invoice itself is for Lightning.
How do I create a Lightning invoice?
Press 'Receive' in a Lightning wallet, enter an amount and share the QR code or text.
Can I put a Lightning invoice on my website?
A static invoice can only be paid once. Use a BOLT 12 offer or a Lightning address for reusable payments.