Repository navigation
feat(payments): add optional allowSelfPayment to send [AMB-3241] - #56
Merged
Merged
Conversation
LND rejects a payment to its own node unless allow_self_payment is set, so a team could not pay its own invoice from another wallet on the same node. The flag is off by default and forwarded to both the LND and litd bodies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bufo24
marked this pull request as ready for review
September 24, 2026 13:07
bufo24
force-pushed
the
feat/AMB-3241-allow-self-payment
branch
from
September 24, 2026 13:07
c781079 to
2e0dced
Compare
wthrajat
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A team could not pay an invoice that one of its own wallets issued, for example a USDT invoice paid from the team's BTC wallet. The SDK had no way to allow this payment.
Change
SendParams.allowSelfPayment, off by default. When not set, the payment request is unchanged.true,send()allows paying an invoice the team issued itself.retryPayment(id, { allowSelfPayment })accepts the same flag, so a failed self-payment can be retried (new exportedRetryPaymentOptions).docs/INTEGRATION.md, andAGENTS.mddocument the flag.Test plan
send()andretryPayment()pnpm typecheck,pnpm build,pnpm test(76 passed),pnpm format:check🤖 Generated with Claude Code