On this page

latest contributor to this doc

Last Edit:

@smk762

Generate Lightning Invoice

API-v2lightning::payments::generate_invoice

Generates a Lightning Network invoice for receiving payments.

ParameterTypeRequiredDescription
coinstringThe ticker of the coin for the invoice.
amountstringAmount to receive (in satoshis or msats).
descriptionstringInvoice description.
expiryintegerInvoice expiry time in seconds.

ParameterTypeDescription
invoicestringThe generated Lightning invoice.
idintRequest identifier.

lightning::payments::generate_invoice

POST
lightning::payments::generate_invoice
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "lightning::payments::generate_invoice",
  "params": {
    "coin": "tBTC-lightning",
    "amount": "10000",
    "description": "Test invoice"
  },
  "id": 101
}