Lightning invoice expiry and the final HTLC use different clocks

Explainer5 min read

Compare a BOLT 11 invoice’s expiry in seconds with a final HTLC’s block-height limit. Read a fictional timeline without assuming payment or refund.

Brokzi compares an expired fictional invoice clock with separate Bitcoin block-height markers. The payment outcome remains unshown.
AI-assisted editorial illustration · Brokzi
On this page

A Lightning invoice can pass its deadline while that clock tells you nothing conclusive about an HTLC accepted earlier. To interpret the situation, separate the invoice’s expiry in seconds from the final HTLC’s block-height limit. Then look for the payment’s actual outcome.

This is a narrow comparison of two limits, using invented observations. For the request’s other fields and the difference between a request and a paid record, see our Lightning invoice explainer.

Which deadline uses seconds?

A BOLT 11 invoice contains a timestamp and may include an expiry field, tagged x. Add that duration to the timestamp to get the request deadline. If x is absent, the specification defines a default of 3,600 seconds.

After that deadline, BOLT 11 says a payer should not attempt payment and a recipient should not accept it. Those are the specification’s “SHOULD NOT” requirements. They concern using the expired request, not a statement that every earlier HTLC has already reached a final result. See BOLT 11’s tagged fields and payer/payee requirements.

Which limit uses Bitcoin blocks?

An HTLC, or hash-time-locked contract, is a conditional payment used in a Lightning channel. The final hop is the last link to the recipient. Its cltv_expiry identifies a block-height limit, rather than the invoice’s wall-clock deadline.

The invoice’s c field is named min_final_cltv_expiry_delta in BOLT 11. It gives the minimum margin requested for that last HTLC. BOLT 2 describes this terminal margin as the difference between the HTLC’s CLTV timeout and the current block height. Forwarding hops have their own delta requirements; this article compares only the final hop.

A margin is not an appointment for payment completion. Nor should you convert a number of blocks into a precise number of minutes. Block arrival times vary, and payment resolution has its own protocol steps. BOLT 2 explains the safety margins, deadlines and HTLC removal rules.

One fictional timeline, two independent readings

Invent an invoice issued at 14:00 UTC with x = 900 seconds. Its deadline is 14:15 UTC. Give it an explicit c = 18 for this example. These are teaching values, not a decoded invoice or an app’s observed settings.

Now stipulate that a matching final HTLC was accepted at 14:14:50 UTC, when the observed block height was 800,000. Its expiry height is 800,030. Assume all other acceptance conditions were satisfied. We are not testing a recipient’s acceptance or hold-invoice policy.

ObservationRequest clockObserved heightGap to HTLC height 800,030
14:14:50 UTC, HTLC accepted by assumptionBefore 14:15 UTC800,00030 blocks
14:16 UTC, later snapshotAfter 14:15 UTC800,00129 blocks

At acceptance, 800,030 − 800,000 = 30 blocks, which exceeds the explicit 18-block minimum. In the later snapshot, 800,030 − 800,001 = 29 blocks. The table states both the times and heights as separate fictional observations. It does not derive one from the other or report the real chain height on any date.

At 14:16 the invoice deadline has passed. Those two observations still do not show whether the earlier HTLC was fulfilled or failed. The 29-block gap describes the stated heights; it does not promise a remaining payment window or a refund in 29 blocks.

Protocol defaults are not every app’s invoice settings

BOLT 11 defines omitted-field behavior: x defaults to 3,600 seconds, and when c is absent the payer must use a final expiry delta of at least 18 blocks. An invoice creator can supply explicit fields instead. The example above supplies both, so it is not relying on an app’s defaults.

The checked Core Lightning source at commit 4002c4e illustrates the distinction. Its invoice-creation code defaults the expiry parameter to 604,800 seconds, or seven days, and takes the default cltv parameter from the node’s configured cltv_final. It then writes those values into its invoice fields. That is different from interpreting an invoice whose fields are absent. See the pinned Core Lightning invoice implementation.

This identifies one implementation revision. It does not establish the settings of a particular node, the behavior of every wallet, or how long a merchant might hold a payment.

What establishes the payment’s outcome?

BOLT 2 treats fulfillment and failure as separate HTLC updates, with commitment rules and deadlines. Some situations require channel closure and onchain resolution. The invoice clock passing does not, by itself, demonstrate that any of those steps finished.

Likewise, reaching an HTLC’s height is not the same observation as seeing a completed refund. The relevant payment and channel records matter. A wallet’s displayed status needs its own interpretation; these specifications do not require every interface to use identical labels.

For the separate onchain question of what a transaction time condition establishes, see Bitcoin locktime and confirmations. Here, the useful reading rule is to identify the unit first: request seconds, HTLC blocks, or an actual result record. Only the last of those can answer what happened to the payment.

Sources

The complete specifications and pinned implementation were checked on 18 November 2026. The repository revisions were current at that check. All times, heights and acceptance assumptions above are fictional. No invoice string, payment hash, preimage, wallet, node, signature, payment or recovery operation was created or tested.

See something wrong? Brokzi logs material changes. Prepare a correction note.

About the byline

Brokzi Editorial

The accountable byline for Brokzi’s explainers, definitions, news notes, and corrections.

Editorial responsibility →