Skip to content

Specify k1 hold/release and GFY 6 reason tokens - #19

Open
shocknet-justin wants to merge 2 commits into
1.8from
spec-debit-gfy-6-replay
Open

shocknet-justin wants to merge 2 commits into
1.8from
spec-debit-gfy-6-replay

Conversation

@shocknet-justin

@shocknet-justin shocknet-justin commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Session k1 is a correlator, not an auth token. The node service MUST hold each k1 (per pointer) from a valid direct-payment 21002 until payout success, application denial, or confirmed-failed payout.
  • Success stays consumed. Denial or confirmed-fail MUST release the hold; the requestor MAY send a new invoice with the same k1.
  • A second customer request on a held or succeeded k1 is GFY 6 with "reason": "k1_already_processed". Application approval of a live request is authorization to pay; a later yes after a no is still an approval.
  • GFY 6 reason is the protocol key (k1_already_processed, invoice_in_progress, invoice_already_failed, invoice_already_paid). error is human-readable and MUST NOT be matched.
  • k1 is valid only on a direct payment (bolt11 present, frequency absent). Lowercase bolt11 before compare, store, and pay.

Companion PRs: Lightning.Pub#1028, ClinkSDK#27.

Test plan

Spec-only change.

A later ATM yes after a no is still an approval. Only a second customer request on a held or succeeded k1 is k1_already_processed.

Co-authored-by: Cursor <cursoragent@cursor.com>
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

Successfully merging this pull request may close these issues.

2 participants