Adds settle receivable functionality
Implements a "Settle Receivable" feature for super users to record manual payments from users who owe money. Introduces a dialog for inputting payment details (amount, method, description, reference), triggers an API call to record the transaction, and updates user balances and transaction history. This is for non-lightning payments like cash, bank transfers, or checks.
This commit is contained in:
parent
d06f46a63c
commit
1412359172
4 changed files with 278 additions and 1 deletions
10
models.py
10
models.py
|
|
@ -181,6 +181,16 @@ class RecordPayment(BaseModel):
|
|||
payment_hash: str
|
||||
|
||||
|
||||
class SettleReceivable(BaseModel):
|
||||
"""Manually settle a receivable (user pays castle in person)"""
|
||||
|
||||
user_id: str
|
||||
amount: int # Amount in satoshis
|
||||
payment_method: str # "cash", "bank_transfer", "lightning", "other"
|
||||
description: str # Description of the payment
|
||||
reference: Optional[str] = None # Optional reference (receipt number, transaction ID, etc.)
|
||||
|
||||
|
||||
class AssertionStatus(str, Enum):
|
||||
"""Status of a balance assertion"""
|
||||
PENDING = "pending" # Not yet checked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue