2020-08-08 17:47:53 +02:00
.TH "LIGHTNING-DELPAY" "7" "" "" "lightning-delpay"
.SH NAME
lightning-delpay - Command for removing a completed or failed payment
.SH SYNOPSIS
2020-08-19 12:38:50 +02:00
\fB delpay\fR \fI payment_hash\fR \fI status\fR
2020-08-08 17:47:53 +02:00
.SH DESCRIPTION
2020-08-19 12:38:50 +02:00
The \fB delpay\fR RPC command deletes a payment with the given \fB payment_hash\fR if its status is either \fB complete\fR or \fB failed\fR \. Deleting a \fB pending\fR payment is an error\.
2020-08-08 17:47:53 +02:00
.RS
.IP \[ bu]
2020-08-19 12:38:50 +02:00
\fI payment_hash\fR : The unique identifier of a payment\.
2020-08-08 17:47:53 +02:00
.IP \[ bu]
2020-08-19 12:38:50 +02:00
\fI status\fR : Expected status of the payment\.
Only deletes if the payment status matches\.
2020-08-08 17:47:53 +02:00
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "delpay",
"params": {
"payment_hash": "4fa2f1b001067ec06d7f95b8695b8acd9ef04c1b4d1110e3b94e1fa0687bb1e0",
"status": "complete"
}
}
.RE
.fi
.SH RETURN VALUE
2021-05-26 07:55:01 +02:00
The returned format is the same as \fB lightning-listsendpays\fR (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\.
2020-08-08 17:47:53 +02:00
2021-05-26 07:55:01 +02:00
On success, an object containing \fB payments\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[ bu]
\fB id\fR (u64): unique ID for this payment attempt
.IP \[ bu]
\fB payment_hash\fR (hex): the hash of the \fI payment_preimage\fR which will prove payment (always 64 characters)
.IP \[ bu]
\fB status\fR (string): status of the payment (one of "pending", "failed", "complete")
.IP \[ bu]
\fB amount_sent_msat\fR (msat): the amount we actually sent, including fees
.IP \[ bu]
\fB created_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[ bu]
\fB partid\fR (u64, optional): unique ID within this (multi-part) payment
.IP \[ bu]
\fB destination\fR (pubkey, optional): the final destination of the payment if known
.IP \[ bu]
\fB amount_msat\fR (msat, optional): the amount the destination received, if known
.IP \[ bu]
\fB payment_preimage\fR (hex, optional): proof of payment (always 64 characters)
.IP \[ bu]
\fB label\fR (string, optional): the label, if given to sendpay
.IP \[ bu]
\fB bolt11\fR (string, optional): the bolt11 string (if pay supplied one)
.IP \[ bu]
\fB bolt12\fR (string, optional): the bolt12 string (if supplied for pay: \fB experimental-offers\fR only)\.
.IP \[ bu]
\fB erroronion\fR (hex, optional): the error onion returned on failure, if any\.
.RE
2020-08-19 12:38:50 +02:00
On failure, an error is returned\. If the lightning process fails before responding, the
2020-08-08 17:47:53 +02:00
caller should use \fB lightning-listsentpays\fR (7) or \fB lightning-listpays\fR (7) to query whether this payment was deleted or not\.
The following error codes may occur:
.RS
.IP \[ bu]
2020-08-19 12:38:50 +02:00
-32602: Parameter missed or malformed;
2020-08-08 17:47:53 +02:00
.IP \[ bu]
2020-08-19 12:38:50 +02:00
211: Payment status mismatch\. Check the correct status via \fB paystatus\fR ;
2020-08-08 17:47:53 +02:00
.IP \[ bu]
208: Payment with payment_hash not found\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"payments": [
{
"id": 2,
"payment_hash": "8dfd6538eeb33811c9114a75f792a143728d7f05643f38c3d574d3097e8910c0",
"destination": "0219f8900ee78a89f050c24d8b69492954f9fdbabed753710845eb75d3a75a5880",
"msatoshi": 1000,
"amount_msat": "1000msat",
"msatoshi_sent": 1000,
"amount_sent_msat": "1000msat",
"created_at": 1596224858,
"status": "complete",
"payment_preimage": "35bd4e2b481a1a84a22215b5372672cf81460a671816960ddb206464359e1822",
"bolt11": "lntb10n1p0jga20pp53h7k2w8wkvuprjg3ff6l0y4pgdeg6lc9vsln3s74wnfsjl5fzrqqdqdw3jhxazldahx2xqyjw5qcqp2sp5wut5jnhr6n7jd5747ky2g5flmw7hgx9yjnqzu60ps2jf6f7tc0us9qy9qsqu2a0k37nckl62005p69xavlkydkvhnypk4dphffy4x09zltwh9437ad7xkl83tefdarzhu5t30ju5s56wlrg97qkx404pq3srfc425cq3ke9af"
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI <vincenzo.palazzo@protonmail.com\fR > is mainly responsible\.
.SH SEE ALSO
\fB lightning-listpays\fR (7), \fB lightning-listsendpays\fR (7), \fB lightning-paystatus\fR (7)\.
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2021-06-16 03:08:17 +02:00
\" SHA256STAMP:143436ad1fe8687300cb5ccb433630905a56af81aaf3aa61abfa7b1548af9177