2022-03-24 00:57:28 +01:00
|
|
|
lightning-delinvoice -- Command for removing an invoice (or just its description)
|
|
|
|
=================================================================================
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
2022-03-24 00:57:28 +01:00
|
|
|
**delinvoice** *label* *status* [*desconly*]
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The **delinvoice** RPC command removes an invoice with *status* as given
|
2022-03-24 00:57:28 +01:00
|
|
|
in **listinvoices**, or with *desconly* set, removes its description.
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
The caller should be particularly aware of the error case caused by the
|
|
|
|
*status* changing just before this command is invoked!
|
|
|
|
|
2022-03-24 00:57:28 +01:00
|
|
|
If *desconly* is set, the invoice is not deleted, but has its
|
|
|
|
description removed (this can save space with very large descriptions,
|
|
|
|
as would be used with lightning-invoice(7) *deschashonly*.
|
|
|
|
|
2019-08-10 01:54:18 +02:00
|
|
|
RETURN VALUE
|
|
|
|
------------
|
|
|
|
|
2021-05-26 07:55:01 +02:00
|
|
|
Note: The return is the same as an object from lightning-listinvoice(7).
|
|
|
|
|
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-START)
|
|
|
|
On success, an object is returned, containing:
|
2022-09-05 23:33:09 +02:00
|
|
|
|
2021-05-26 07:55:01 +02:00
|
|
|
- **label** (string): Unique label given at creation time
|
2022-09-05 23:45:06 +02:00
|
|
|
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
|
2021-05-26 07:55:01 +02:00
|
|
|
- **status** (string): State of invoice (one of "paid", "expired", "unpaid")
|
2022-09-05 23:45:06 +02:00
|
|
|
- **expires\_at** (u64): UNIX timestamp when invoice expires (or expired)
|
2021-05-26 07:55:01 +02:00
|
|
|
- **bolt11** (string, optional): BOLT11 string
|
|
|
|
- **bolt12** (string, optional): BOLT12 string
|
2022-09-05 23:45:06 +02:00
|
|
|
- **amount\_msat** (msat, optional): the amount required to pay this invoice
|
2021-06-16 03:03:17 +02:00
|
|
|
- **description** (string, optional): description used in the invoice
|
2021-05-26 07:55:01 +02:00
|
|
|
|
|
|
|
If **bolt12** is present:
|
2022-09-05 23:33:09 +02:00
|
|
|
|
2022-09-05 23:45:06 +02:00
|
|
|
- **local\_offer\_id** (hex, optional): offer for which this invoice was created
|
2022-11-09 03:32:00 +01:00
|
|
|
- **invreq\_payer\_note** (string, optional): the optional *invreq_payer_note* from invoice_request which created this invoice
|
2021-05-26 07:55:01 +02:00
|
|
|
|
|
|
|
If **status** is "paid":
|
2022-09-05 23:33:09 +02:00
|
|
|
|
2022-09-05 23:45:06 +02:00
|
|
|
- **pay\_index** (u64): unique index for this invoice payment
|
|
|
|
- **amount\_received\_msat** (msat): how much was actually received
|
|
|
|
- **paid\_at** (u64): UNIX timestamp of when payment was received
|
|
|
|
- **payment\_preimage** (secret): SHA256 of this is the *payment_hash* offered in the invoice (always 64 characters)
|
2021-09-03 12:07:59 +02:00
|
|
|
|
2021-05-26 07:55:01 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-END)
|
2019-08-10 01:54:18 +02:00
|
|
|
|
2020-07-19 11:04:03 +02:00
|
|
|
ERRORS
|
|
|
|
------
|
|
|
|
|
|
|
|
The following errors may be reported:
|
|
|
|
|
|
|
|
- -1: Database error.
|
|
|
|
- 905: An invoice with that label does not exist.
|
|
|
|
- 906: The invoice *status* does not match the parameter.
|
|
|
|
An error object will be returned as error *data*, containing
|
|
|
|
*current_status* and *expected_status* fields.
|
|
|
|
This is most likely due to the *status* of the invoice
|
|
|
|
changing just before this command is invoked.
|
2022-03-24 00:57:28 +01:00
|
|
|
- 908: The invoice already has no description, and *desconly* was set.
|
2020-07-19 11:04:03 +02:00
|
|
|
|
2019-08-10 01:54:18 +02:00
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
|
|
|
|
Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible.
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
lightning-listinvoice(7), lightning-waitinvoice(7),
|
|
|
|
lightning-invoice(7), lightning-delexpiredinvoice(7),
|
2022-09-19 02:53:00 +02:00
|
|
|
lightning-autoclean-status(7)
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
RESOURCES
|
|
|
|
---------
|
|
|
|
|
|
|
|
Main web site: <https://github.com/ElementsProject/lightning>
|
2020-08-25 03:33:16 +02:00
|
|
|
|
2022-11-09 03:32:00 +01:00
|
|
|
[comment]: # ( SHA256STAMP:961571f6b2155f0452ac376bdf957474dd20e97e05a89efdf590f6e4da310f4f)
|