Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set expiration time for lightning invoices to meet other apps needs #87

Open
PatMulligan opened this issue Jun 23, 2022 · 2 comments

Comments

@PatMulligan
Copy link

Hey guys! I was testing out a BTCPay Server refund feature, and I ran into an issue which is that BTCPay will only refund an invoice that has an expiration time of at least 1 day. This is problematic, because Muun's automatic lightning invoice expiration time is 24 hours from the moment it's created, and then of course immediately drops below that immediately.

I will contact BTCPay Server about this as well, I don't see why a refund that's set to be approved automatically should require such a relatively long expiration time.

In general it seems like an issue that could arise again as some places may require arbitrary amounts of time for expiration? Does it make any sense to make this time limit adjustable by the user? Will let you know what BTCPay team says...

@acrespo
Copy link
Member

acrespo commented Jun 29, 2022

Hey there!

Thanks for the feedback! I'll let our Product team know so we can take your suggestion into account.

Not so long ago, we increased the expiration time of our invoices to 24h due to the feedback we received. If I may ask, is this really a need to be able to configure each invoice expiration time or would having a longer expiration time be simpler/better?

Be that as it may, I'll tell you a bit about why this is problematic. The longer the expiration time the more constraints and operational load we have when upgrading or changing Lightning nodes:

  • If you have a single node (no redundancy) you can't really do it (without downtime)
  • If you have multiple nodes, changing all nodes becomes an operational task that lasts the span of your invoice expiration time (currently for us, 24h).
  • Also, any configuration change (e.g. fee policy, adding a new node, etc...) takes longer to propagate (again, currently for us, 24h).

Hope this shed some light on the issue. Did you manage to find out why BTCPayServer requires longer than 24h expiration times?

Don't know if this is any help but note that expiration times may be approaching its sunset (though I imagine I'll take quite some time). AFAIU with Bolt12 there's no more expiration times.

@avantgarden
Copy link

I'm working on app which use BOLT11 invoices. For use case of this app longer expiration date would be much appreciated. Please increase default expiration date to eg: 1 month and/or allow users set their own. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants