Is there an absolute limit the payment request expiry?

I can't find this in the BOLTs, but maybe this is up to the implementations?

1 Answer 1


I think it is not explicitly specified. But c-lightning uses for example an unsigned int 64. Overall the expiry is obviously created to allow nodes to not store payment preimages for requested invoices for too much time. So therefor it makes sense to use values that don't extend too much actual time. I don't see why an invoice should for example be valid for a year. But technically it is certainly possible.

  • Thank you for clarifying. At the moment my solution is to mark the payment as Failed if it has been in flight for more than 7 days and I do not have the payment request and cannot find the expiry time in any other way. ofc. if I have the expiry time I simply use that. Jun 21 at 11:25
  • Forgot the question in the comment above. Do you think 7 days is enough to safely assume that they payment has failed? or perhaps could I assume it earlier? Jun 21 at 11:26
  • That seems to be a totally different beast! For example the htlc could have been arrived at the destination and there is a delay in settlement. Also I think some implementations ignored the expiry and still released the preimage if they could Jun 21 at 13:34
  • That sounds dangerous, can't that lead to a lot of trouble? I guess as long as no nodes on the route fail the payment and your node is still up, then an invoice can just remain until the HTLC has to fail to prevent loss of funds? So the limit would be the cltv_expiry? Jun 21 at 14:51
  • Yes absolutely. And when you say cltv expiry i hope you meant the one of the htlc that you offered 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.