mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-20 21:29:51 +02:00
Add description to POST v1/payments endpoint. (#1848)
This commit is contained in:
@@ -300,6 +300,14 @@ async def api_payments_pay_invoice(bolt11: str, wallet: Wallet):
|
|||||||
|
|
||||||
@core_app.post(
|
@core_app.post(
|
||||||
"/api/v1/payments",
|
"/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,
|
status_code=HTTPStatus.CREATED,
|
||||||
)
|
)
|
||||||
async def api_payments_create(
|
async def api_payments_create(
|
||||||
|
Reference in New Issue
Block a user