.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] \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 .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:28d1e97fe8e8925008b20815c55db569b7ed8dad33d958c0914945c71fb9d654