What is a Lightning Invoice?
A Lightning invoice (also called a BOLT11 invoice) is a payment request on the Lightning Network. Unlike traditional Bitcoin addresses that can receive multiple payments, Lightning invoices are typically single-use and contain specific payment details including the amount, destination, and expiration time.
Lightning invoices always start with lnbc (mainnet), lntb (testnet), or lnsb (signet). The string that follows contains encoded information about the payment, protected by a cryptographic signature.
Understanding the BOLT11 Format
BOLT11 is the technical specification for Lightning Network invoices. The format uses bech32 encoding (similar to modern Bitcoin addresses) to pack payment information efficiently. A BOLT11 invoice contains:
- Network prefix - Identifies whether this is mainnet (lnbc), testnet (lntb), or another network
- Amount - The requested payment amount (optional for "any amount" invoices)
- Timestamp - When the invoice was created
- Tagged fields - Payment hash, description, expiry, route hints, and more
- Signature - Cryptographic proof that the invoice is legitimate
Key Invoice Fields Explained
Payment Hash
The payment hash is a 256-bit value that uniquely identifies the payment. It's created by hashing a secret preimage. When you pay the invoice, you receive this preimage as proof of payment. This cryptographic mechanism ensures atomic payments across the Lightning Network.
Destination (Payee Public Key)
The 33-byte public key of the node that will receive the payment. This identifies the final destination in the Lightning Network graph. Your wallet uses this to find a route to the recipient.
Expiry Time
How long the invoice remains valid after creation. The default is 3600 seconds (1 hour), but this can vary. Expired invoices cannot be paid. This prevents issues with stale payment requests and changing exchange rates.
Route Hints
Optional routing information to help find a path to the destination. These are especially important for nodes with private channels that aren't publicly announced on the network graph.
Frequently Asked Questions
What does a Lightning invoice look like?
A Lightning invoice is a long string of lowercase letters and numbers starting with "lnbc" (for mainnet). For example: lnbc1500n1p.... The string encodes all payment details and is typically 200-500 characters long, depending on what information is included.
Can I reuse a Lightning invoice?
Generally, no. Lightning invoices are designed for single use. Once paid, the payment hash is "consumed" and the invoice cannot be paid again. Some implementations support "keysend" or "AMP" invoices for repeated payments, but standard BOLT11 invoices are one-time use.
What happens if a Lightning invoice expires?
Expired invoices cannot be paid. If you try to pay an expired invoice, your wallet will reject it. The recipient would need to generate a new invoice with a fresh expiration time. This protects both parties from stale payment requests.
Why do some invoices have no amount?
"Zero-amount" or "any amount" invoices let the payer choose how much to send. These are useful for donations, tips, or situations where the exact amount isn't known in advance. The payer specifies the amount when making the payment.
What is the payment hash used for?
The payment hash is the cryptographic core of Lightning payments. It's a SHA-256 hash of a secret preimage. When payment succeeds, you receive this preimage as irrefutable proof of payment. This hash-preimage mechanism enables trustless payments across multiple hops.
How do I decode a Lightning invoice?
You can use this tool to decode any BOLT11 invoice instantly. Just paste the invoice string and all fields will be extracted and displayed. The decoding happens entirely in your browser - your invoice data never leaves your device.
What are route hints in an invoice?
Route hints provide information about how to reach the destination node. They include intermediate node public keys, channel IDs, and fee information. These hints are especially important when the recipient has private (unannounced) channels that aren't visible in the public network graph.
Is it safe to share a Lightning invoice?
Yes, Lightning invoices are designed to be shared publicly. They only contain information needed to pay you - they don't expose private keys or allow anyone to withdraw funds. However, the invoice may reveal your node's public key and any route hint information.
What's the difference between BOLT11 and BOLT12?
BOLT11 is the current standard for Lightning invoices. BOLT12 (offers) is a newer proposal that enables reusable payment codes, better privacy, and recurring payments. While BOLT12 is still being adopted, BOLT11 remains the most widely supported format.
Why does my invoice show "Any amount"?
This means the invoice doesn't specify a required payment amount. The sender can choose how much to pay when initiating the payment. This is common for donation links, tip jars, and flexible payment scenarios.
Build with Lightning
Spark is a Bitcoin L2 for developers. Instant payments, stablecoins, and programmable money - all on Bitcoin.