.TH "LIGHTNING-WAITINVOICE" "7" "" "" "lightning-waitinvoice" .SH NAME lightning-waitinvoice - Command for waiting for specific payment .SH SYNOPSIS \fBwaitinvoice\fR \fIlabel\fR .SH DESCRIPTION The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid, then returns that single entry as per \fBlistinvoice\fR\. .SH RETURN VALUE On success, an object is returned, containing: .RS .IP \[bu] \fBlabel\fR (string): unique label supplied at invoice creation .IP \[bu] \fBdescription\fR (string): description used in the invoice .IP \[bu] \fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters) .IP \[bu] \fBstatus\fR (string): Whether it's paid or expired (one of "paid", "expired") .IP \[bu] \fBexpires_at\fR (u64): UNIX timestamp of when it will become / became unpayable .IP \[bu] \fBamount_msat\fR (msat, optional): the amount required to pay this invoice .IP \[bu] \fBbolt11\fR (string, optional): the BOLT11 string (always present unless \fIbolt12\fR is) .IP \[bu] \fBbolt12\fR (string, optional): the BOLT12 string (always present unless \fIbolt11\fR is) .RE If \fBstatus\fR is "paid": .RS .IP \[bu] \fBpay_index\fR (u64): Unique incrementing index for this payment .IP \[bu] \fBamount_received_msat\fR (msat): the amount actually received (could be slightly greater than \fIamount_msat\fR, since clients may overpay) .IP \[bu] \fBpaid_at\fR (u64): UNIX timestamp of when it was paid .IP \[bu] \fBpayment_preimage\fR (hex): proof of payment (always 64 characters) .RE On error the returned object will contain \fBcode\fR and \fBmessage\fR properties, with \fBcode\fR being one of the following: .RS .IP \[bu] -32602: If the given parameters are wrong\. .IP \[bu] -1: If the invoice is deleted while unpaid, or the invoice does not exist\. .IP \[bu] 903: If the invoice expires before being paid, or is already expired\. .RE .SH AUTHOR Christian Decker \fI is mainly responsible\. .SH SEE ALSO \fBlightning-waitanyinvoice\fR(7), \fBlightning-listinvoice\fR(7), \fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7) .SH RESOURCES Main web site: \fIhttps://github.com/ElementsProject/lightning\fR \" SHA256STAMP:db69e2582b766856b174bf6bee2b9e9dbb398cdd31ba6d0f3e826648d24cee62