LIGHTNING-LISTINVOICES(7)
πΈ NAME πΈ
okay bestie, welcome to LIGHTNING-LISTINVOICES(7) β the manual page for listinvoices, aka the command for querying invoice status. no cap, this one is all about checking a specific invoice if it exists, or every invoice if you give it no argument, and it's honestly giving main character energy for your node's receipts. π
β¨ SYNOPSIS β¨
here's the vibe check, literally:
listinvoices [label] [invstring] [payment_hash] [offer_id] [index
[start] [limit]]
π DESCRIPTION π
the listinvoices RPC command gets the status of a specific invoice, if it exists, or the status of all invoices if you give it no argument. it's that simple, bestie. β¨
lowkey important: only one of the query parameters can be used fromlabel,invstring,payment_hash, oroffer_id. pick one, not a whole combo meal. π
query params, in cute list form:
label(one of, optional) β a label used at the creation of the invoice to get a specific invoice. it's one of:(string)(integer)
invstring(string, optional) β the string value to query a specific invoice.payment_hash(hex, optional) β apayment_hashof the invoice to get the details of a specific invoice.offer_id(string, optional) β a localoffer_idthe invoice was issued for, to get a specific invoice's details.index(string, optional) (one of"created","updated") β if neitherin_channelnorout_channelis specified, it controls ordering. the default iscreated. (added v23.08)start(u64, optional) β ifindexis specified,startmay be specified to start from that value, which is generally returned fromlightning-wait(7). (added v23.08)limit(u32, optional) β ifindexis specified,limitcan be used to specify the maximum number of entries to return. (added v23.08)
π RETURN VALUE π
on success, an object containing invoices is returned. it's an array of objects, where each object contains:
label(string) β unique label supplied at invoice creation.payment_hash(hash) β the hash of thepayment_preimagewhich will prove payment.status(string) (one of"unpaid","paid","expired") β whether it's paid, unpaid or unpayable.expires_at(u64) β UNIX timestamp of when it will become / became unpayable.created_index(u64) β 1-based index indicating order this invoice was created in. (added v23.08)description(string, optional) β description used in the invoice.amount_msat(msat, optional) β the amount required to pay this invoice.bolt11(string, optional) β the BOLT11 string (always present unlessbolt12is).bolt12(string, optional) β the BOLT12 string (always present unlessbolt11is).local_offer_id(hash, optional) β the id of our offer which created this invoice.invreq_payer_note(string, optional) β the optionalinvreq_payer_notefrominvoice_requestwhich created this 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 status is "paid", you also get these cuties:
pay_index(u64) β unique incrementing index for this payment.amount_received_msat(msat) β the amount actually received (could be slightly greater thanamount_msat, since clients may overpay).paid_at(u64) β UNIX timestamp of when it was paid.payment_preimage(secret) β proof of payment.paid_outpoint(object, optional) β outpoint this invoice was paid with. (added v23.11):txid(txid) β ID of the transaction that paid the invoice. (added v23.11)outnum(u32) β the 0-based output number of the transaction that paid the invoice. (added v23.11)
π¦ AUTHOR π¦
the main character mainly responsible is Rusty Russell, rusty@rustcorp.com.au. slay. π
π SEE ALSO π
go read lightning-waitinvoice(7), lightning-delinvoice(7), and lightning-invoice(7). iykyk. β¨
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
okay these examples are long but they ate, fr fr. copy them exactly:
Example 1:
Request:
$ lightning-cli listinvoices -k "label"="lbl_l21"
{
"id": "example:listinvoices#1",
"method": "listinvoices",
"params": {
"label": "lbl_l21"
}
}
Response:
{
"invoices": [
{
"label": "lbl_l21",
"bolt11": "lnbcrt100n1pnt2bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000",
"payment_hash": "paymenthashinvl0210021002100210021002100210021002100210021002100",
"status": "paid",
"pay_index": 4,
"amount_received_msat": 400000,
"paid_at": 1738500000,
"payment_preimage": "paymentpreimager010101010101010101010101010101010101010101010101",
"description": "l21 description",
"expires_at": 1739000000,
"created_index": 2,
"updated_index": 4
}
]
}
Example 2:
Request:
$ lightning-cli listinvoices
{
"id": "example:listinvoices#2",
"method": "listinvoices",
"params": {}
}
Response:
{
"invoices": [
{
"label": "lbl balance l1 to l2",
"bolt11": "lnbcrt222n1pnt3005720bolt114000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"payment_hash": "paymenthashdelpay10101010101010101010101010101010101010101010101",
"amount_msat": 500000000,
"status": "paid",
"pay_index": 1,
"amount_received_msat": 500000000,
"paid_at": 1738500000,
"payment_preimage": "paymentpreimgdp1010101010101010101010101010101010101010101010101",
"description": "description send some sats l1 to l2",
"expires_at": 1739000000,
"created_index": 1,
"updated_index": 1
},
{
"label": "lbl_l21",
"bolt11": "lnbcrt100n1pnt2bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000bolt11invl020100000000",
"payment_hash": "paymenthashinvl0210021002100210021002100210021002100210021002100",
"status": "paid",
"pay_index": 4,
"amount_received_msat": 400000,
"paid_at": 1738510000,
"payment_preimage": "paymentpreimager010101010101010101010101010101010101010101010101",
"description": "l21 description",
"expires_at": 1739010000,
"created_index": 2,
"updated_index": 4
},
{
"label": "lbl_l22",
"bolt11": "lnbcrt100n1pnt2bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000bolt11invl020200000000",
"payment_hash": "paymenthashinvl0220022002200220022002200220022002200220022002200",
"amount_msat": 200000,
"status": "unpaid",
"description": "l22 description",
"expires_at": 1739020000,
"created_index": 3,
"paid_at": 1738520000
},
{
"label": "label inv_l24",
"bolt11": "lnbcrt100n1pnt2bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000",
"payment_hash": "paymenthashinvl0240024002400240024002400240024002400240024002400",
"amount_msat": 123000,
"status": "unpaid",
"description": "description inv_l24",
"expires_at": 1739030000,
"created_index": 4,
"paid_at": 1738530000
},
{
"label": "label inv_l25",
"bolt11": "lnbcrt100n1pnt2bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000",
"payment_hash": "paymenthashinvl0250025002500250025002500250025002500250025002500",
"amount_msat": 124000,
"status": "unpaid",
"description": "description inv_l25",
"expires_at": 1739040000,
"created_index": 5,
"paid_at": 1738540000
}
]
}
okay bestie, that's the whole page β footer era is Core Lightning v26.06.9 and LIGHTNING-LISTINVOICES(7), periodt. mwah π
π¦ 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