mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-04 04:54:47 +01:00
61 lines
1.6 KiB
Groff
61 lines
1.6 KiB
Groff
|
.TH "LIGHTNING-CREATEINVOICE" "7" "" "" "lightning-createinvoice"
|
||
|
.SH NAME
|
||
|
lightning-createinvoice - Low-level invoice creation
|
||
|
.SH SYNOPSIS
|
||
|
|
||
|
\fBcreateinvoice\fR \fIinvstring\fR \fIpreimage\fR \fIlabel\fR
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
|
||
|
The \fBcreateinvoice\fR RPC command signs and saves an invoice into the
|
||
|
database\.
|
||
|
|
||
|
|
||
|
The \fIinvstring\fR parameter is of bolt11 form, but without the final
|
||
|
signature appended\. Minimal sanity checks are done\.
|
||
|
|
||
|
|
||
|
The \fIpreimage\fR is the preimage to supply upon successful payment of
|
||
|
the invoice\.
|
||
|
|
||
|
|
||
|
The \fIlabel\fR must be a unique string or number (which is treated as a
|
||
|
string, so "01" is different from "1"); it is never revealed to other
|
||
|
nodes on the lightning network, but it can be used to query the status
|
||
|
of this invoice\.
|
||
|
|
||
|
.SH RETURN VALUE
|
||
|
|
||
|
On success, an invoice object is returned, as per \fBlistinvoices\fR(7)\.
|
||
|
|
||
|
|
||
|
On failure, an error is returned and no invoice is created\. If the
|
||
|
lightning process fails before responding, the caller should use
|
||
|
\fBlightning-listinvoices\fR(7) to query whether this invoice was created or
|
||
|
not\.
|
||
|
|
||
|
|
||
|
The following error codes may occur:
|
||
|
|
||
|
.RS
|
||
|
.IP \[bu]
|
||
|
-1: Catchall nonspecific error\.
|
||
|
.IP \[bu]
|
||
|
900: An invoice with the given \fIlabel\fR already exists\.
|
||
|
|
||
|
.RE
|
||
|
.SH AUTHOR
|
||
|
|
||
|
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
||
|
|
||
|
.SH SEE ALSO
|
||
|
|
||
|
\fBlightning-invoice\fR(7), \fBlightning-listinvoices\fR(7), \fBlightning-delinvoice\fR(7),
|
||
|
\fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7)\.
|
||
|
|
||
|
.SH RESOURCES
|
||
|
|
||
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
||
|
|
||
|
\" SHA256STAMP:1b6598e430d416615867dc09604574c62a8ecb47c51a370711da75359ff80ef3
|