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
coinstring✓The ticker of the coin for the invoice.
amountstring✓Amount to receive (in satoshis or msats).
descriptionstring✗Invoice description.
expiryinteger✗Invoice 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
}