2021-01-07 19:45:47 +01:00
.TH "LIGHTNING-FETCHINVOICE" "7" "" "" "lightning-fetchinvoice"
.SH NAME
lightning-fetchinvoice - Command for fetch 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
\fB fetchinvoice\fR \fI offer\fR [\fI msatoshi\fR ] [\fI quantity\fR ] [\fI recurrence_counter\fR ] [\fI recurrence_start\fR ] [\fI recurrence_label\fR ] [\fI timeout\fR ]
.SH DESCRIPTION
The \fB fetchinvoice\fR RPC command contacts the issuer of an \fI offer\fR to get
an actual invoice that can be paid\. It highlights any changes between the
offer and the returned invoice\.
The offer must not contain \fI send_invoice\fR ; see \fB lightning-sendinvoice\fR (7)\.
\fI msatoshi\fR is required if the \fI offer\fR does not specify
an amount at all, otherwise it is not allowed\.
\fI quantity\fR is is required if the \fI offer\fR specifies
\fI quantity_min\fR or \fI quantity_max\fR , otherwise it is not allowed\.
\fI recurrence_counter\fR is required if the \fI offer\fR
specifies \fI recurrence\fR , otherwise it is not allowed\.
\fI recurrence_counter\fR should first be set to 0, and incremented for
each successive invoice in a given series\.
\fI recurrence_start\fR is required if the \fI offer\fR
specifies \fI recurrence_base\fR with \fI start_any_period\fR set, otherwise it
is not allowed\. It indicates what period number to start at\.
\fI recurrence_label\fR is required if \fI recurrence_counter\fR is set, and
otherwise is not allowed\. It must be the same as prior fetchinvoice
calls for the same recurrence, as it is used to link them together\.
\fI timeout\fR is an optional timeout; if we don't get a reply before this
we fail (default, 60 seconds)\.
.SH RETURN VALUE
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
On success, an object is returned, containing:
2021-01-07 19:45:47 +01:00
.RS
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB invoice\fR (string): The BOLT12 invoice we fetched
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB changes\fR (object): Summary of changes from offer:
2021-01-07 19:45:47 +01:00
.RS
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB description_appended\fR (string, optional): extra characters appended to the \fI description\fR field\.
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB description\fR (string, optional): a completely replaced \fI description\fR field
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB vendor_removed\fR (string, optional): The \fI vendor\fR from the offer, which is missing in the invoice
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB vendor\fR (string, optional): a completely replaced \fI vendor\fR field
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB msat\fR (msat, optional): the amount, if different from the offer amount multiplied by any \fI quantity\fR (or the offer had no amount, or was not in BTC)\.
2021-01-07 19:45:47 +01:00
.RE
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
.IP \[ bu]
\fB next_period\fR (object, optional): Only for recurring invoices if the next period is under the \fI recurrence_limit\fR :
2021-01-07 19:45:47 +01:00
.RS
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB counter\fR (u64): the index of the next period to fetchinvoice
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB starttime\fR (u64): UNIX timestamp that the next period starts
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB endtime\fR (u64): UNIX timestamp that the next period ends
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB paywindow_start\fR (u64): UNIX timestamp of the earliest time that the next invoice can be fetched
2021-01-07 19:45:47 +01:00
.IP \[ bu]
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
\fB paywindow_end\fR (u64): UNIX timestamp of the latest time that the next invoice can be fetched
.RE
2021-01-07 19:45:47 +01:00
.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 trying to fetch an invoice\.
.RE
.SH AUTHOR
Rusty Russell \fI <rusty@rustcorp.com.au\fR > is mainly responsible\.
.SH SEE ALSO
\fB lightning-sendinvoice\fR (7), \fB lightning-pay\fR (7)\.
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2021-06-16 03:08:17 +02:00
\" SHA256STAMP:532248cb5adbadb10367fdbddc2da7af0eeac50b29709abec2e1e8b178197b7c