@ -37,7 +37,11 @@ lightning-waitinvoice \- Protocol for waiting for specific payment\&.
The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid, then returns that single entry as per \fBlistinvoice\fR\&.
The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid, then returns that single entry as per \fBlistinvoice\fR\&.
.SH"RETURN VALUE"
.SH"RETURN VALUE"
.sp
.sp
On success, an invoice description will be returned as per lightning\-listinvoice(7): \fIcomplete\fR will always be \fItrue\fR\&.
On success, an invoice description will be returned as per lightning\-listinvoice(7)\&. The \fIstatus\fR field will be \fIpaid\fR\&.
.sp
If the invoice is deleted while unpaid, or the invoice does not exist, this command will return with an error with code \-1\&.
.sp
If the invoice expires before being pad, or is already expired, this command will return with an error with code \-2, with the data being the invoice data as per \fBlistinvoice\fR\&.
.SH"AUTHOR"
.SH"AUTHOR"
.sp
.sp
Christian Decker <decker\&.christian@gmail\&.com> is mainly responsible\&.
Christian Decker <decker\&.christian@gmail\&.com> is mainly responsible\&.