2019-08-10 02:12:44 +02:00
|
|
|
.TH "LIGHTNING-DELINVOICE" "7" "" "" "lightning-delinvoice"
|
|
|
|
.SH NAME
|
2019-08-31 14:30:56 +02:00
|
|
|
lightning-delinvoice - Command for removing an invoice
|
2019-08-10 02:12:44 +02:00
|
|
|
.SH SYNOPSIS
|
|
|
|
|
2018-01-18 04:57:16 +01:00
|
|
|
\fBdelinvoice\fR \fIlabel\fR \fIstatus\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
|
|
|
The \fBdelinvoice\fR RPC command removes an invoice with \fIstatus\fR as given
|
|
|
|
in \fBlistinvoices\fR\.
|
|
|
|
|
|
|
|
|
|
|
|
The caller should be particularly aware of the error case caused by the
|
|
|
|
\fIstatus\fR changing just before this command is invoked!
|
|
|
|
|
|
|
|
.SH RETURN VALUE
|
|
|
|
|
2021-05-26 07:55:01 +02:00
|
|
|
Note: The return is the same as an object from \fBlightning-listinvoice\fR(7)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2021-05-26 07:55:01 +02:00
|
|
|
|
|
|
|
On success, an object is returned, containing:
|
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \[bu]
|
|
|
|
\fBlabel\fR (string): Unique label given at creation time
|
|
|
|
.IP \[bu]
|
2021-06-16 03:03:17 +02:00
|
|
|
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
|
|
|
|
.IP \[bu]
|
2021-05-26 07:55:01 +02:00
|
|
|
\fBstatus\fR (string): State of invoice (one of "paid", "expired", "unpaid")
|
|
|
|
.IP \[bu]
|
|
|
|
\fBexpires_at\fR (u64): UNIX timestamp when invoice expires (or expired)
|
|
|
|
.IP \[bu]
|
|
|
|
\fBbolt11\fR (string, optional): BOLT11 string
|
|
|
|
.IP \[bu]
|
|
|
|
\fBbolt12\fR (string, optional): BOLT12 string
|
2021-06-16 03:03:17 +02:00
|
|
|
.IP \[bu]
|
|
|
|
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
|
|
|
|
.IP \[bu]
|
|
|
|
\fBdescription\fR (string, optional): description used in the invoice
|
2021-05-26 07:55:01 +02:00
|
|
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
If \fBbolt12\fR is present:
|
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \[bu]
|
|
|
|
\fBlocal_offer_id\fR (hex, optional): offer for which this invoice was created
|
|
|
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
If \fBstatus\fR is "paid":
|
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \[bu]
|
|
|
|
\fBpay_index\fR (u64): unique index for this invoice payment
|
|
|
|
.IP \[bu]
|
|
|
|
\fBamount_received_msat\fR (msat): how much was actually received
|
|
|
|
.IP \[bu]
|
|
|
|
\fBpaid_at\fR (u64): UNIX timestamp of when payment was received
|
|
|
|
.IP \[bu]
|
|
|
|
\fBpayment_preimage\fR (hex): SHA256 of this is the \fIpayment_hash\fR offered in the invoice (always 64 characters)
|
|
|
|
|
|
|
|
.RE
|
2020-07-19 11:04:03 +02:00
|
|
|
.SH ERRORS
|
|
|
|
|
|
|
|
The following errors may be reported:
|
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \[bu]
|
|
|
|
-1: Database error\.
|
|
|
|
.IP \[bu]
|
|
|
|
905: An invoice with that label does not exist\.
|
|
|
|
.IP \[bu]
|
|
|
|
906: The invoice \fIstatus\fR does not match the parameter\.
|
|
|
|
An error object will be returned as error \fIdata\fR, containing
|
|
|
|
\fIcurrent_status\fR and \fIexpected_status\fR fields\.
|
2020-08-25 03:33:16 +02:00
|
|
|
This is most likely due to the \fIstatus\fR of the invoice
|
|
|
|
changing just before this command is invoked\.
|
2020-07-19 11:04:03 +02:00
|
|
|
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
.SH AUTHOR
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
\fBlightning-listinvoice\fR(7), \fBlightning-waitinvoice\fR(7),
|
|
|
|
\fBlightning-invoice\fR(7), \fBlightning-delexpiredinvoice\fR(7),
|
|
|
|
\fBlightning-autocleaninvoice\fR(7)
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2021-06-16 03:08:17 +02:00
|
|
|
\" SHA256STAMP:ff36afbf0c8f27efd0c6e82f32ba783e511f53f5978342b210ba78038c1934bf
|