Allow Lightning invoice reuse and re-payment from the dashboard.

Store LNbits invoice data on payments, add an invoice endpoint that reuses valid invoices or regenerates expired ones, and wire the booking payment page to fetch and display invoices via a shared watcher hook.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michilis
2026-07-01 16:48:28 +00:00
co-authored by Cursor
parent 09bfb17f03
commit 78ffd0ae52
10 changed files with 331 additions and 34 deletions
+5
View File
@@ -36,6 +36,11 @@ export interface CreateInvoiceParams {
extra?: Record<string, any>; // Additional metadata
}
// How long a booking's Lightning invoice is valid for, in seconds. Shared
// between initial booking creation and invoice regeneration so both produce
// invoices with the same lifetime.
export const LNBITS_INVOICE_EXPIRY_SECONDS = 900; // 15 minutes
/**
* Check if LNbits is configured
*/