.TH "LIGHTNING-DELINVOICE" "7" "" "" "lightning-delinvoice" .SH NAME lightning-delinvoice - Command for removing an invoice .SH SYNOPSIS \fBdelinvoice\fR \fIlabel\fR \fIstatus\fR .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 Note: The return is the same as an object from \fBlightning-listinvoice\fR(7)\. On success, an object is returned, containing: .RS .IP \[bu] \fBlabel\fR (string): Unique label given at creation time .IP \[bu] \fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters) .IP \[bu] \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 .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 .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 .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\. This is most likely due to the \fIstatus\fR of the invoice changing just before this command is invoked\. .RE .SH AUTHOR Rusty Russell \fI is mainly responsible\. .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 Main web site: \fIhttps://github.com/ElementsProject/lightning\fR \" SHA256STAMP:ff36afbf0c8f27efd0c6e82f32ba783e511f53f5978342b210ba78038c1934bf