diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index c4956bb3f..c1a1ad2aa 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -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(