getAlby / getAlby/lightning-browser-extension
[Feature] 1 invoice for 2 (or more)
- Dominant language
- TypeScript
- Stars
- 585
- Forks
- 228
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 16
Description
### Feature description
An invoice is attached to a single person, so if I want to pay A and B, first A creates an invoice and sends to me and B does the same thing (then I pay).
This has this problem:
- I can't guarantee that either both will receive or none will receive, paying A could be successful but paying B could fail, forcing me to do a pay retry with B
This could be understood as a database transaction feature, where everything works thus is saved in the database or nothing works thus is not saved into the database.
### Describe the solution
A solution to this would be to make an invoice based in 2 or even more lightning addresses, that when paid, calculates the percentage for each one and attempts to pay both.
So when you decode the invoice, A gets 20% of the total amount and B 80% of the total amount.
### Describe alternatives
Currently I need to do it manually but it's not elegant.
### Additional context
_No response_
### Are you working on this?
None
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by mapping the existing invoice and Lightning-address payment flow, then clarify atomic failure behavior and percentage allocation; done requires an agreed design and tests covering multi-recipient settlement.
Written by the indexing model from the issue text.
Assessment
- Domain
- distributed-systems, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100