LIGHTNING-DELPAY(7)
π LIGHTNING-DELPAY(7) β the delpay glow-up π
okay bestie, welcome to lightning-delpay, straight out of the Core Lightning manual (that's the LIGHTNING-DELPAY(7) energy you're feeling β¨). This is the page for delpay β the command that removes a payment that's already done or already flopped. No cap, it's a little cleanup queen. π§Ήπ
πΈ NAME πΈ
delpay β the Command for removing a completed or failed payment. literally that. she deletes things. respectfully. π
β SYNOPSIS β
delpay payment_hash status [partid groupid]
that's it. that's the whole vibe. one hash, one status, and optionally the partid/groupid duo if you're being extra specific. π¦
π«Ά DESCRIPTION π«Ά
so the delpay RPC command deletes a payment with the given payment_hash β but only if its status is either complete or failed. she's picky like that and honestly? iconic. If partid and groupid are not specified, all payment parts with matchin status are deleted. π
here's the cast of characters:
payment_hash(hash) β The unique identifier of a payment. her social security number, basically. πͺͺstatus(string) (one of"complete","failed") β Expected status of the payment. Only deletes if the payment status matches. Deleting a pending payment will return an error. so like, don't come for her while she's still mid-glow-up. πpartid(u64, optional) β Specific partid to delete (must be paired with groupid). it's giving "these two are a package deal". πgroupid(u64, optional) β Specific groupid to delete (must be paired with partid). same energy, other half of the duo. π
π RETURN VALUE π
The returned format is the same as lightning-listsendpays(7). If the payment is a multi-part payment (MPP) the command return a list of payments will be returned -- one payment object for each partid. bestie she's thorough, she brings receipts for every single part. π§Ύβ¨
On success, an object containing payments is returned. It is an array of objects, where each object contains:
created_index(u64) β 1-based index indicating order this payment was created in. (added v23.11) β¨id(u64) β Old synonym forcreated_index. the vintage version, still slaying. π΅payment_hash(hash) β The hash of thepayment_preimagewhich will prove payment. πstatus(string) (one of"pending","failed","complete") β Status of the payment. vibe check, basically. πamount_sent_msat(msat) β The amount we actually sent, including fees. yes the fees are real and yes they count. πΈcreated_at(u64) β The UNIX timestamp showing when this payment was initiated. her birthday. πpartid(u64, optional) β Unique ID within this (multi-part) payment. π§©destination(pubkey, optional) β The final destination of the payment if known. where she's headed. πΊοΈamount_msat(msat, optional) β The amount the destination received, if known. πupdated_index(u64, optional) β 1-based index indicating order this payment was changed (only present if it has changed since creation). (added v23.11) βcompleted_at(u64, optional) β The UNIX timestamp showing when this payment was completed. the graduation date πgroupid(u64, optional) β Grouping key to disambiguate multiple attempts to pay an invoice or the samepayment_hash. πpayment_preimage(secret, optional) β Proof of payment. the sacred text. πlabel(string, optional) β The label, if given tosendpay. π·οΈbolt11(string, optional) β The bolt11 string (ifpaysupplied one). π§Ύbolt12(string, optional) β The bolt12 string (if supplied forpay). π§Ύβ¨erroronion(hex, optional) β The error onion returned on failure, if any. the sad little onion of regret π§ π
π ERRORS π
On failure, an error is returned. If the lightning process fails before responding, the caller should use lightning-listsentpays(7) or lightning-listpays(7) to query whether this payment was deleted or not. (translation: if she ghosts you mid-operation, go check yourself, don't just assume. π«Ά)
The following error codes may occur:
-32602β Parameter missed or malformed; π©211β Payment status mismatch. Check the correct status viapaystatus; π208β Payment withpayment_hashnot found. she's not here, girl. π
π§ AUTHOR π§
Vincenzo Palazzo vincenzo.palazzo@protonmail.com is mainly responsible. give him his flowers. ππ
π¦ SEE ALSO π¦
lightning-listpays(7), lightning-listsendpays(7), lightning-xpay(7)
go read those too, iykyk. πβ¨
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
Example 1 π
Request:
$ lightning-cli delpay -k "payment_hash"="paymenthashdelpay10101010101010101010101010101010101010101010101" "status"="complete"
{
"id": "example:delpay#1",
"method": "delpay",
"params": {
"payment_hash": "paymenthashdelpay10101010101010101010101010101010101010101010101",
"status": "complete"
}
}
Response:
{
"payments": [
{
"created_index": 1,
"id": 1,
"payment_hash": "paymenthashdelpay10101010101010101010101010101010101010101010101",
"groupid": 1,
"updated_index": 1,
"destination": "nodeid020202020202020202020202020202020202020202020202020202020202",
"amount_msat": 500000000,
"amount_sent_msat": 500000000,
"created_at": 1738000000,
"completed_at": 1738500000,
"status": "complete",
"payment_preimage": "paymentpreimgdp1010101010101010101010101010101010101010101010101",
"bolt11": "lnbcrt222n1pnt3005720bolt114000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
}
]
}
Example 2 π
Request:
$ lightning-cli delpay "paymenthashdelpay20202020202020202020202020202020202020202020202" "failed"
{
"id": "example:delpay#2",
"method": "delpay",
"params": [
"paymenthashdelpay20202020202020202020202020202020202020202020202",
"failed"
]
}
Response:
{
"payments": [
{
"created_index": 23,
"id": 23,
"payment_hash": "paymenthashdelinv10101010101010101010101010101010101010101010101",
"groupid": 1,
"updated_index": 22,
"destination": "nodeid030303030303030303030303030303030303030303030303030303030303",
"amount_msat": 50000000,
"amount_sent_msat": 50000501,
"created_at": 1738000000,
"completed_at": 1738500000,
"status": "failed",
"bolt11": "lnbcrt222n1pnt3005720bolt113000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
}
]
}
Example 3 π₯
Request:
$ lightning-cli delpay -k "payment_hash"="paymenthashdelpay30303030303030303030303030303030303030303030303" "status"="failed" "groupid"=1 "partid"=2
{
"id": "example:delpay#3",
"method": "delpay",
"params": {
"payment_hash": "paymenthashdelpay30303030303030303030303030303030303030303030303",
"status": "failed",
"groupid": 1,
"partid": 2
}
}
Response:
{
"payments": [
{
"created_index": 20,
"id": 20,
"payment_hash": "paymenthashdelpay30303030303030303030303030303030303030303030303",
"groupid": 1,
"updated_index": 19,
"partid": 2,
"destination": "nodeid040404040404040404040404040404040404040404040404040404040404",
"amount_msat": 1000000,
"amount_sent_msat": 1000000,
"created_at": 1738000000,
"completed_at": 1738500000,
"status": "failed"
}
]
}
π that's the whole page bestie. go delete your payments responsibly. and remember: onlycompleteorfailedβ pending payments are NOT invited to this party. π«π
okay so, sign-off time: this masterpiece is from Core Lightning v26.06.9, and yeah, it lives under the LIGHTNING-DELPAY(7) banner. periodt. π
β¨π·
π¦ 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