Hold Invoice
Another name for the same pattern: a payment locked until a condition is met or it expires.
Basically
A hold invoice lets the receiver wait before taking a Lightning payment. The money stays locked until a condition is met, the receiver rejects it, or time runs out.
Key Takeaways
- A hold invoice is a Lightning Network invoice where the receiver withholds the preimage after receiving payment, keeping the HTLC pending until a condition is met or the invoice is explicitly cancelled.
- Hold invoices enable escrow-like functionality on Lightning without a trusted third party. The receiver can settle, cancel, or let the payment time out, supporting marketplaces, atomic swaps, and conditional payments.
- Pending hold invoices lock liquidity along the entire payment route, which can strain routing nodes and reduce network capacity. Applications should minimise hold duration and cancel promptly when conditions fail.
What Is a Hold Invoice?
A hold invoice is a Lightning Network invoice where the recipient deliberately delays releasing the payment preimage after receiving the incoming HTLC. A standard Lightning payment reveals the preimage immediately upon receiving the HTLC and settles in milliseconds, but a hold invoice keeps the HTLC pending with funds locked but not yet claimed. The receiver can then settle the payment by revealing the preimage, cancel it by rejecting the HTLC, or let it expire via the timelock.
The mechanism turns a simple payment into a conditional one. The receiver gains a decision point between receiving funds and claiming them, enabling use cases like escrow, pay-on-delivery, and cross-layer atomic swaps that would otherwise require a trusted intermediary.
The term "hold invoice" is the formal, descriptive name for this pattern. The Lightning community often calls it a hodl invoice, referencing the crypto meme "HODL", originally a misspelling of "hold" from a 2013 Bitcoin forum post. Both terms refer to the identical mechanism. LND's original implementation used "hodl invoice" in its API naming, while Bitcoin Optech and more formal documentation tend to use "hold invoice".
How It Works
A normal Lightning payment provides the baseline for a hold invoice. Its steps show where the receiver usually reveals the preimage and settles.
A hold invoice modifies step 4. The application layer generates the preimage externally, provides only the hash to the node, and retains control over when or whether to reveal it instead of allowing the Lightning node to settle automatically.
The sender sees a hold invoice as identical to any other Lightning invoice and cannot distinguish between the two. The BOLT 11 encoding is the same. The only observable difference is that the payment may take longer to resolve.
Three Possible Outcomes
Every hold invoice resolves in one of three ways. The receiver can settle it, cancel it, or let it expire.
Implementation in LND
LND provides native hold invoice support through its invoicesrpc subserver, available since March 2019. The key APIs are exposed through this subserver.
The critical difference from a regular invoice concerns preimage control. With addinvoice, LND generates the preimage internally and settles automatically, while addholdinvoice lets the application provide the hash and retain the preimage, giving it full control over settlement.
Implementation in Core Lightning
Core Lightning (CLN) supports hold invoices through plugins rather than built-in RPCs. The actively maintained plugin from Boltz Exchange provides equivalent functionality.
CLN plugins can also intercept HTLCs via the htlc_accepted hook, enabling custom hold logic at a lower level. The Boltz plugin includes auto-cancellation safety logic that cancels pending invoices before the HTLC timelock expires, by default 6 blocks before expiry, to prevent force-close scenarios.
Hold Invoices vs. Regular Invoices
The comparison highlights the key differences between standard Lightning invoices and hold invoices. It focuses on how each invoice handles settlement.
Marketplace Escrow
Peer-to-peer marketplaces like RoboSats use hold invoices to create trustless escrow: the buyer pays a hold invoice and locks funds in the HTLC, then the seller sees the committed funds and ships the goods. Once the buyer confirms receipt, the seller settles the invoice and claims payment; if the seller never ships, the HTLC times out and the buyer recovers their sats. No intermediary holds funds at any point.
Submarine Swaps
Submarine swaps move funds between on-chain Bitcoin and Lightning, and services like Loop and Boltz use hold invoices to keep the Lightning leg pending while an on-chain transaction confirms. Both legs share the same payment hash, so claiming one side reveals the preimage needed for the other and guarantees atomic settlement.
Exchange Deposits
Cryptocurrency exchanges can accept Lightning deposits using hold invoices. The exchange holds the invoice pending while running compliance checks, verifying the sender's identity, or waiting for internal account crediting workflows. If checks fail, the exchange cancels the invoice and the sender immediately recovers funds, so no refund process is needed.
Conditional Delivery
Any payment conditional on an external event can use hold invoices. The mechanism gives the receiver a decision point before settlement.
Locked Liquidity and Routing Impact
A pending hold invoice locks funds not only for the sender but at every routing node along the payment path. Each hop has an HTLC consuming channel capacity, so a payment routed through five hops leaves six channels with liquidity locked for the entire hold duration.
Each channel direction supports a maximum of 483 concurrent in-flight HTLCs, derived from the maximum Bitcoin transaction size. Hold invoices that persist for long periods occupy these slots, potentially blocking other payments from routing through affected channels. Some routing nodes therefore reject HTLCs with very long CLTV deltas or deprioritise traffic from nodes known to produce long-held HTLCs.
Channel Jamming and Griefing
Malicious actors can exploit hold invoices for channel jamming attacks. An attacker can send payments to hold invoices they control and never settle, locking victim routing node liquidity at zero cost. Only 483 small HTLCs are needed to completely jam a channel in one direction. The Lightning Network community is developing mitigations like HTLC endorsement, a reputation-based mechanism that would allow routing nodes to prioritise trusted traffic.
Timeout and Force-Close Risk
A receiver who fails to settle or cancel a hold invoice before the HTLC timelock expires may force intermediate nodes to close channels on-chain to protect their funds. These closures incur on-chain fees and take channels offline. Well-designed implementations include auto-cancellation logic that cancels pending invoices several blocks before the CLTV expiry deadline.
Applications using hold invoices need continuous monitoring and alerting. A system crash during the hold period could mean the receiver misses the settlement window entirely. The preimage must be stored durably because the receiver cannot claim funds if it is lost, even when conditions are met.
CLTV Accumulation
Each routing hop adds its own CLTV delta to the timelock chain. A five-hop route where each node requires a 40-block delta gives the sender a total timelock exceeding 200 blocks, roughly 33 hours. Hold invoices amplify this because the hold period at the destination is additive. Excessively long CLTV values on hold invoices reduce the probability of successful routing because intermediate nodes may reject the HTLC.
Why It Matters
Hold invoices unlock conditional payment logic on the Lightning Network without sacrificing the trustless properties that make Bitcoin valuable. They are the primitive behind submarine swaps, peer-to-peer exchange escrow, and any application that needs a decision point between sending and receiving funds. As the Lightning ecosystem matures, solutions like HTLC endorsement and hold fee proposals aim to reduce the negative externalities of long-held HTLCs, making hold invoices more sustainable for the broader network.
Developers building on Bitcoin Layer 2 infrastructure need to understand Lightning invoice types. Hold invoices represent one approach to programmable payments on Lightning. Newer protocols like Spark take a different approach to conditional transfers by using virtual UTXOs and FROST threshold signatures, avoiding the liquidity-locking trade-offs inherent to HTLC-based hold patterns.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.