Skip to content

Peering: Lightning invoices for paid peering — issue, settle, renew, lapse #937

Closed

Description

@chappie-daemon

Part of the relay peering work in #931.

Scope

The source (selling) side of paid peering, using nostream's existing payments processors — the same machinery as admission fees:

  • When a configured peer with paid terms authenticates, the source relay issues a BOLT11 invoice for the amount/period from its advertised terms.
  • Settlement is detected via the existing processor callbacks; on settlement the peer's feed access activates until the end of the paid period.
  • Before expiry, the source offers a renewal invoice.
  • If the period lapses unpaid, the feed is suspended — stored data and sync state are kept, so resuming is a payment, not a re-sync from zero.

Acceptance

  • A paid peering relationship completes end-to-end: authenticate → invoice → settlement → feed active for exactly the paid period.
  • An unpaid lapse suspends the feed; paying the renewal resumes it without re-reconciliation.
  • Invoice/settlement state per peer is recorded for the admin console.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. moved this from Backlog to In progress in Peeringon Nov 9, 2026
  3. moved this from In progress to Done in Peeringon Nov 16, 2026
  4. added a commit that references this issue on Nov 16, 2026
    12de80b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions