LIGHTNING-DELINVOICE(7)
π NAME π
Okay so bestie, welcome to lightning-delinvoice(7) β the manual page for delinvoice, the command for removing an invoice (or just its description) π
. It's giving cleanup era, no cap.
β¨ SYNOPSIS β¨
delinvoice label status [desconly]
πΈ DESCRIPTION πΈ
The delinvoice RPC command removes an invoice with status as given in listinvoices, or β with desconly set β removes its description. Iconic behavior, honestly β¨.
labelβ one of these, bestie; it's the label of the invoice to be deleted:(string)(u64)
statusβ(string)(one of"paid","expired","unpaid"): the label of the invoice to be deleted. The caller should be particularly aware of the error case caused by the status changing just before this command is invoked! π This is the βit was fine a second agoβ of RPCs.desconlyβ(boolean, optional): if set toTrue, the invoice is not deleted, but has its description removed. This can save space with very large descriptions, as would be used withlightning-invoice(7)deschashonly. It's giving minimalist era π .
π RETURN VALUE π
Note: the return is the same as an object from lightning-listinvoices(7). On success, an object is returned, containing:
labelβ(string): unique label given at creation time.payment_hashβ(hash): the hash of thepayment_preimagewhich will prove payment.created_indexβ(u64): 1-based index indicating order this invoice was created in. (added v23.08)statusβ(string)(one of"paid","expired","unpaid"): state of invoice.expires_atβ(u64): UNIX timestamp when invoice expires (or expired).bolt11β(string, optional): BOLT11 string.bolt12β(string, optional): BOLT12 string.amount_msatβ(msat, optional): the amount required to pay this invoice.descriptionβ(string, optional): description used in the invoice.updated_indexβ(u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). (added v23.08)
If bolt12 is present:
local_offer_idβ(hex, optional): offer for which this invoice was created.invreq_payer_noteβ(string, optional): the optionalinvreq_payer_notefrominvoice_requestwhich created this invoice.
If status is "paid":
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 thepayment_hashoffered in the invoice.
π 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, containingcurrent_statusandexpected_statusfields. This is most likely due to the status of the invoice changing just before this command is invoked. The βnot me refreshing at the exact wrong momentβ energy π.908β the invoice already has no description, anddesconlywas set.
π«Ά AUTHOR π«Ά
Rusty Russell rusty@rustcorp.com.au is mainly responsible. Main character energy, honestly π.
π₯ SEE ALSO π₯
lightning-listinvoices(7)lightning-waitinvoice(7)lightning-invoice(7)lightning-autoclean-status(7)
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
π§ EXAMPLES π§
β¨ Example 1 β¨
Request:
$ lightning-cli delinvoice -k "label"="lbl_l36" "status"="unpaid"
{
"id": "example:delinvoice#1",
"method": "delinvoice",
"params": {
"label": "lbl_l36",
"status": "unpaid"
}
}
Response:
{
"label": "lbl_l36",
"bolt11": "lnbcrt222n1pnt3005720bolt113000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"payment_hash": "paymenthashdelinv10101010101010101010101010101010101010101010101",
"amount_msat": 50000000,
"status": "unpaid",
"description": "l36 description",
"expires_at": 1739000000,
"created_index": 9
}
β¨ Example 2 β¨
Request:
$ lightning-cli delinvoice -k "label"="lbl_l37" "status"="paid" "desconly"=True
{
"id": "example:delinvoice#2",
"method": "delinvoice",
"params": {
"label": "lbl_l37",
"status": "paid",
"desconly": true
}
}
Response:
{
"label": "lbl_l37",
"bolt11": "lnbcrt222n1pnt3005720bolt113000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"payment_hash": "paymenthashdelinv20202020202020202020202020202020202020202020202",
"amount_msat": 50000000,
"status": "paid",
"pay_index": 9,
"amount_received_msat": 50000000,
"paid_at": 1738500000,
"payment_preimage": "paymentpreimagedelinv01010101010101010101010101010101010101010101",
"expires_at": 1739000000,
"created_index": 10,
"updated_index": 9
}
Okay that's the whole page, bestie β source/version is Core Lightning v26.06.9, and the footer didn't print a date, so no fake date energy from me. Catch you later for more lightning-delinvoice(7) adventures π«Άπ
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms