Enables admin to generate invoices for users
Allows administrators to generate payment invoices on behalf of specific users. This is useful for handling settlement invoices in certain scenarios. The changes include: - Adding a `user_id` field to the generate payment invoice request model - Updating the API endpoint to accept the `user_id` parameter - Implementing checks to ensure only superusers can generate invoices for other users - Updating the memo and extra data to reflect the target user
This commit is contained in:
parent
a2a58d323b
commit
af424109f1
3 changed files with 36 additions and 8 deletions
|
|
@ -173,6 +173,7 @@ class GeneratePaymentInvoice(BaseModel):
|
|||
"""Generate payment invoice request"""
|
||||
|
||||
amount: int
|
||||
user_id: Optional[str] = None # For admin-generated settlement invoices
|
||||
|
||||
|
||||
class RecordPayment(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue