2021-01-07 19:45:47 +01:00
|
|
|
.TH "LIGHTNING-SENDINVOICE" "7" "" "" "lightning-sendinvoice"
|
|
|
|
.SH NAME
|
|
|
|
lightning-sendinvoice - Command for send an invoice for an offer
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
2021-01-14 04:36:59 +01:00
|
|
|
\fB(WARNING: experimental-offers only)\fR
|
2021-01-07 19:45:47 +01:00
|
|
|
|
|
|
|
|
2021-01-07 19:53:47 +01:00
|
|
|
\fBsendinvoice\fR \fIoffer\fR [\fIlabel\fR] [\fImsatoshi\fR] [\fItimeout\fR] [\fIquantity\fR]
|
2021-01-07 19:45:47 +01:00
|
|
|
|
|
|
|
.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)\.
|
|
|
|
|
|
|
|
|
|
|
|
\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
|
2021-01-07 19:53:47 +01:00
|
|
|
invoice or return an error, default 90 seconds\. This will also be the
|
|
|
|
timeout on the invoice that is sent\.
|
2021-01-07 19:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
\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
|
|
|
|
|
2021-01-07 19:50:47 +01:00
|
|
|
On success, an object as per \fBlightning-waitinvoice\fR(7)\.
|
2021-01-07 19:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
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<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
\fBlightning-fetchinvoice\fR(7)\.
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
|
|
|
|
2021-01-14 04:36:59 +01:00
|
|
|
\" SHA256STAMP:25da409961f77393d1af898e5ddf7757c4ed14c1a4eea58264c969924259ab1e
|