mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 14:51:05 +01:00
Add description to POST v1/payments endpoint. (#1848)
This commit is contained in:
parent
1fd4d9d514
commit
d4de78f1e8
1 changed files with 8 additions and 0 deletions
|
@ -300,6 +300,14 @@ async def api_payments_pay_invoice(bolt11: str, wallet: Wallet):
|
|||
|
||||
@core_app.post(
|
||||
"/api/v1/payments",
|
||||
summary="Create or pay an invoice",
|
||||
description="""
|
||||
This endpoint can be used both to generate and pay a BOLT11 invoice.
|
||||
To generate a new invoice for receiving funds into the authorized account,
|
||||
specify at least the first four fields in the POST body: `out: false`, `amount`, `unit`, and `memo`.
|
||||
To pay an arbitrary invoice from the funds already in the authorized account,
|
||||
specify `out: true` and use the `bolt11` field to supply the BOLT11 invoice to be paid.
|
||||
""",
|
||||
status_code=HTTPStatus.CREATED,
|
||||
)
|
||||
async def api_payments_create(
|
||||
|
|
Loading…
Add table
Reference in a new issue