.TH "LIGHTNING-SENDINVOICE" "7" "" "" "lightning-sendinvoice" .SH NAME lightning-sendinvoice - Command for send an invoice for an offer .SH SYNOPSIS \fB(WARNING: experimental-offers only)\fR \fBsendinvoice\fR \fIoffer\fR \fIlabel\fR [\fImsatoshi\fR] [\fItimeout\fR] [\fIquantity\fR] .SH DESCRIPTION The \fBsendinvoice\fR RPC command creates and sends an invoice to the issuer of an \fIoffer\fR for it to pay: the offer must contain \fIsend_invoice\fR; see \fBlightning-fetchinvoice\fR(7)\. If \fBfetchinvoice-noconnect\fR is not specified in the configuation, it will connect to the destination in the (currently common!) case where it cannot find a route which supports \fBoption_onion_messages\fR\. \fIoffer\fR is the bolt12 offer string beginning with "lno1"\. \fIlabel\fR is the unique label to use for this invoice\. \fImsatoshi\fR is optional: it is required if the \fIoffer\fR does not specify an amount at all, or specifies it in a different currency\. Otherwise you may set it (e\.g\. to provide a tip), and if not it defaults to the amount contained in the offer (multiplied by \fIquantity\fR if any)\. \fItimeout\fR is how many seconds to wait for the offering node to pay the invoice or return an error, default 90 seconds\. This will also be the timeout on the invoice that is sent\. \fIquantity\fR is optional: it is required if the \fIoffer\fR specifies \fIquantity_min\fR or \fIquantity_max\fR, otherwise it is not allowed\. .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, unpaid or unpayable (one of "unpaid", "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] \fBbolt12\fR (string, optional): the BOLT12 string .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 The following error codes may occur: .RS .IP \[bu] -1: Catchall nonspecific error\. .IP \[bu] 1002: Offer has expired\. .IP \[bu] 1003: Cannot find a route to the node making the offer\. .IP \[bu] 1004: The node making the offer returned an error message\. .IP \[bu] 1005: We timed out waiting for the invoice to be paid .RE .SH AUTHOR Rusty Russell \fI is mainly responsible\. .SH SEE ALSO \fBlightning-fetchinvoice\fR(7)\. .SH RESOURCES Main web site: \fIhttps://github.com/ElementsProject/lightning\fR \" SHA256STAMP:c01a52cc2ab1f5badf212481e3aefb91c8a4c17df93d86bd5f98588f2679d8d6