Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat(payments): subscription lifecycle, renewal invoices and plan-based write access

オープン
#908 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Priyanshubhartistm がすでに取り組んでいます。

2026年10月19日 から。

  • #909 @Priyanshubhartistm による — オープン

評価

この issue はまだ評価されていません。

説明

enhancement

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 SubscriptionService for subscribe, renew and status transitions (active → renewal_pending → past_due → expired).
  • PaymentsService.confirmInvoice extends 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 its plan_id instead of each callback learning about plans.
  • POST /invoices accepts 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.
  • isUserAdmitted checks 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分
マージ済み PR(30日)
73

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cameri/nostream のほかの issue

cameri/nostream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。