Generate Lightning Invoice
API-v2lightning::payments::generate_invoice
Generates a Lightning Network invoice for receiving payments.
Parameter | Type | Required | Description |
---|---|---|---|
coin | string | ✓ | The ticker of the coin for the invoice. |
amount | string | ✓ | Amount to receive (in satoshis or msats). |
description | string | ✗ | Invoice description. |
expiry | integer | ✗ | Invoice expiry time in seconds. |
Parameter | Type | Description |
---|---|---|
invoice | string | The generated Lightning invoice. |
id | int | Request 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
}