lightning-delpay - Command for removing a completed or failed payment
lightning-delpay - Command for removing a completed or failed payment
.SHSYNOPSIS
.SHSYNOPSIS
\fBdelpay\fR\fIpayment_hash\fR[status]
\fBdelpay\fR\fIpayment_hash\fR\fIstatus\fR
.SHDESCRIPTION
.SHDESCRIPTION
The \fBdelpay\fR RPC command removes a payment as given in \fBlistsendpays\fR or \fBlistpays\fR with a complete or failed
The \fBdelpay\fR RPC command deletes a payment with the given \fBpayment_hash\fR if its status is either \fBcomplete\fR or \fBfailed\fR\. Deleting a \fBpending\fR payment is an error\.
status\. However, the command doesn't permit to remove a pending payment\.
.RS
.RS
.IP\[bu]
.IP\[bu]
\fIpayment_hash\fR: Rapresents the unique identifier of a payment\. To find it, you can run \fBlistpays\fR or \fBlistsendpays\fR;
\fIpayment_hash\fR: The unique identifier of a payment\.
.IP\[bu]
.IP\[bu]
\fIstatus\fR is the expected status of the payment\.It can be \fIcomplete\fR or \fIfailed\fR\.
\fIstatus\fR: Expected status of the payment\.
Only delete if the payment status matches\. If not specified, defaults to \fIcomplete\fR\.
Only deletes if the payment status matches\.
.RE
.RE
.SHEXAMPLEJSONREQUEST
.SHEXAMPLEJSONREQUEST
@ -34,11 +33,11 @@ Only delete if the payment status matches\. If not specified, defaults to \fIcom
.fi
.fi
.SHRETURNVALUE
.SHRETURNVALUE
On success, the command will return a payment object, such as the \fBlistsendpays\fR\. In addition, if the payment is a MPP (Multi part payment) the command return a list of
If successful the command returns a payment object, in the same format as \fBlistsendpays\fR\. If the payment is a multi-part payment (MPP) the command return a list of
payments; a payment object for each partid\.
payments will be return -- one payment object for each partid\.
On failure, an error is returned and any payment is deleted\. If the lightning process fails before responding, the
On failure, an error is returned\. If the lightning process fails before responding, the
caller should use \fBlightning-listsentpays\fR(7) or \fBlightning-listpays\fR(7) to query whether this payment was deleted or not\.
caller should use \fBlightning-listsentpays\fR(7) or \fBlightning-listpays\fR(7) to query whether this payment was deleted or not\.
@ -46,9 +45,9 @@ The following error codes may occur:
.RS
.RS
.IP\[bu]
.IP\[bu]
-32602: Some parameter missed or some parameter is malformed;
-32602: Parameter missed or malformed;
.IP\[bu]
.IP\[bu]
211: Payment with payment_hash have a wrong status\. To check the correct status run the command\fBpaystatus\fR;
211: Payment status mismatch\. Check the correct status via\fBpaystatus\fR;
.IP\[bu]
.IP\[bu]
208: Payment with payment_hash not found\.
208: Payment with payment_hash not found\.
@ -88,4 +87,4 @@ Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
@ -4,17 +4,16 @@ lightning-delpay -- Command for removing a completed or failed payment
SYNOPSIS
SYNOPSIS
--------
--------
**delpay** *payment\_hash*\[status\]
**delpay** *payment\_hash**status*
DESCRIPTION
DESCRIPTION
-----------
-----------
The **delpay** RPC command removes a payment as given in **listsendpays** or **listpays** with a complete or failed
The **delpay** RPC command deletes a payment with the given `payment_hash` if its status is either `complete` or `failed`. Deleting a `pending` payment is an error.
status. However, the command doesn't permit to remove a pending payment.
- *payment\_hash*: Rapresents the unique identifier of a payment. To find it, you can run **listpays** or **listsendpays**;
- *payment\_hash*: The unique identifier of a payment.
- *status* is the expected status of the payment. It can be *complete* or *failed*.
- *status*: Expected status of the payment.
Only delete if the payment status matches. If not specified, defaults to *complete*.
Only deletes if the payment status matches.
EXAMPLE JSON REQUEST
EXAMPLE JSON REQUEST
------------
------------
@ -32,16 +31,16 @@ EXAMPLE JSON REQUEST
RETURN VALUE
RETURN VALUE
------------
------------
On success, the command will return a payment object, such as the **listsendpays**. In addition, if the payment is a MPP (Multi part payment) the command return a list of
If successful the command returns a payment object, in the same format as **listsendpays**. If the payment is a multi-part payment (MPP) the command return a list of
payments; a payment object for each partid.
payments will be return -- one payment object for each partid.
On failure, an error is returned and any payment is deleted. If the lightning process fails before responding, the
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.
caller should use lightning-listsentpays(7) or lightning-listpays(7) to query whether this payment was deleted or not.
The following error codes may occur:
The following error codes may occur:
- -32602: Some parameter missed or some parameter is malformed;
- -32602: Parameter missed or malformed;
- 211: Payment with payment\_hash have a wrong status. To check the correct status run the command**paystatus**;
- 211: Payment status mismatch. Check the correct status via**paystatus**;