feat(payments): subscription lifecycle, renewal invoices and plan-based write access
維護者通常 1 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
Is your feature request related to a problem? Please describe.
With the subscription data model in place, nothing creates or extends a subscription, issues renewal invoices, or ends access when a period lapses. Write access still depends only on the permanent is_admitted flag.
Describe the solution you'd like
- A
SubscriptionServicefor subscribe, renew and status transitions (active → renewal_pending → past_due → expired). PaymentsService.confirmInvoiceextends the subscription period (same transaction as the invoice confirmation). All five confirmation paths (maintenance poll and the Zebedee/LNbits/OpenNode/Nodeless callbacks) already go through it, so the invoice carries itsplan_idinstead of each callback learning about plans.POST /invoicesaccepts a plan id; existing admission behaviour is unchanged when no plans are configured.- A periodic sweep (maintenance worker) that issues renewal invoices before period end and moves overdue subscriptions through grace to expired.
isUserAdmittedchecks for an active subscription, reusing the existing admission cache so there is no extra database read per event.- Tests for each transition, the confirm path, and the cache behaviour.
Additional context
- Design: #673. Renewal is invoice-based: Lightning cannot pull funds, so the relay issues a renewal invoice and the user pays it.
- 主要語言
- TypeScript
- 星號
- 829
- 分支
- 234
- 平均合併
- 17 小時 46 分鐘
- 30 天內合併 PR
- 73
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cameri/nostream 的其他 Issue
-
Website
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
Three repositories have no unit tests (notification-outbox, notification-delivery-log, nip05-verification)可能已有人在做 @Priyanshubhartistm 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 72/100
cameri/nostream#905 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 72/100
維護者通常 1 天內回覆
-
No unit tests for four of six payment processors (nodeless, lnurl, opennode, zebedee)可能已有人在做 @Priyanshubhartistm 今天認領。 未關閉
難度 3/5 1-2 天 新手友好度 72/100
cameri/nostream#903 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
維護者通常 1 天內回覆
相似的 Issue
-
area:editor bug issue-form:bug P0 platform:windows review: low
難度 2/5 1-3 小時 新手友好度 64/100
1lck/Lithe-IDEA#1388 ·
維護者通常 1 天內回覆
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without logging未關閉area: backend bug priority: low
難度 2/5 1-3 小時 新手友好度 82/100
snapotter-hq/SnapOtter#3238 ·
維護者通常 1 天內回覆
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the plan未關閉
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
modelcontextprotocol/servers#5216 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆