---
title: LNCLI Methods Overview
slug: lncli-methods-overview
docTags: 
createdAt: 2025-08-15T16:27:12.143Z
---

# LNCLI Command Line Interface Reference

## Info Methods

### getinfo

**Syntax:** lncli getinfo

**Description:** Returns basic information related to the active LND daemon, including identity pubkey, alias, chains connected to, and information about open/pending channels.

**Key Parameters:** No additional parameters required (uses global options like --rpcserver, --macaroonpath, --tlscertpath)

**Usage Example:**

:::BlockQuote
lncli getinfo
:::

### getnetworkinfo

**Syntax:** lncli getnetworkinfo

**Description:** Get statistical information about the current state of the Lightning Network from the node's perspective, including number of nodes, channels, and network capacity.

**Key Parameters:** No additional parameters required

**Usage Example:**

:::BlockQuote
lncli getnetworkinfo
:::

### channelbalance

**Syntax:** lncli channelbalance

**Description:** Returns the sum of the total available channel balance across all open channels, categorized in local/remote, pending local/remote and unsettled local/remote balances.

**Key Parameters:** No additional parameters required

**Usage Example:**

:::BlockQuote
lncli channelbalance
:::

### walletbalance

**Syntax:** lncli walletbalance

**Description:** Compute and display the wallet's current on-chain balance, showing total unspent outputs (confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.

**Key Parameters:**

- \--account - The name of the account to retrieve the balance for (optional)
- \--min\_confs - The minimum number of confirmations each output should have (optional)

**Usage Example:**

:::BlockQuote
lncli walletbalance
lncli walletbalance --min\_confs=3
:::

## Invoice Methods

### addinvoice

**Syntax:** lncli addinvoice \[command options] \[value] \[preimage]

**Description:** Add a new invoice, expressing intent for a future payment. Invoices without an amount can be created by not supplying any parameters or providing an amount of 0, allowing the payer to specify the amount.

**Key Parameters:**

- \--memo - A description of the payment to attach along with the invoice
- \--amt - The amount of satoshis in this invoice (default: 0)
- \--amt\_msat - The amount of millisatoshis in this invoice
- \--expiry - Payment request expiry time in seconds (default: 3600)
- \--amp - Generates an AMP invoice which can be paid multiple times
- \--preimage - The hex-encoded preimage (32 byte) for the invoice
- \--description\_hash - SHA-256 hash of the description
- \--fallback\_addr - Fallback on-chain address

**Usage Examples:**

:::BlockQuote
lncli addinvoice --amt=6969 --memo="A coffee for Roger"
lncli addinvoice --memo="Flexible payment"  # Zero-amount invoice
lncli addinvoice --amt=100000 --memo="Product payment" --expiry=7200
:::

### cancelinvoice

**Syntax:** lncli cancelinvoice \[payment\_hash]

**Description:** Cancel an existing invoice by its payment hash. Note: This command is available in newer versions of LND (0.8.0+) and requires the payment hash in hexadecimal format.

**Key Parameters:**

- payment\_hash - The payment hash of the invoice to cancel (required, hex format)

**Usage Example:**

:::BlockQuote
lncli cancelinvoice 8c5e6ce3dbaa223cf86df3b381a82a8961eb32731bfd4be76e79eb2f5e5dd599
:::

### lookupinvoice

**Syntax:** lncli lookupinvoice \[payment\_hash]

**Description:** Lookup an existing invoice by its payment hash. The passed payment hash must be exactly 32 bytes in hexadecimal format.

**Key Parameters:**

- payment\_hash - The payment hash of the invoice to lookup (required, hex format)

**Usage Example:**

:::BlockQuote
lncli lookupinvoice 8c5e6ce3dbaa223cf86df3b381a82a8961eb32731bfd4be76e79eb2f5e5dd599
:::

### subscribeinvoices

**Syntax:** lncli subscribeinvoices \[command options]

**Description:** Creates a uni-directional stream from the server to the client for notifying the client of any newly created/settled invoices. This is a streaming RPC that will continuously return invoice updates.

**Key Parameters:**

- \--add\_index - The add index starting point for streaming (optional)
- \--settle\_index - The settle index starting point for streaming (optional)

**Usage Example:**

:::BlockQuote
lncli subscribeinvoices
:::

### listinvoices

**Syntax:** lncli listinvoices \[command options]

**Description:** List all invoices currently stored within the database. Any active debug invoices are ignored. It has full support for paginated responses with various filtering options.

**Key Parameters:**

- \--pending\_only - Toggles if all invoices should be returned, or only unsettled ones
- \--index\_offset - The index of an invoice to use as start/end of query (default: 0)
- \--max\_invoices - The max number of invoices to return (default: 100)
- \--paginate-forwards - If set, invoices succeeding the index\_offset will be returned
- \--creation\_date\_start - Filter invoices with creation date >= this timestamp
- \--creation\_date\_end - Filter invoices with creation date \<= this timestamp

**Usage Examples:**

:::BlockQuote
lncli listinvoices
lncli listinvoices --pending\_only
lncli listinvoices --max\_invoices=50
:::

## Payment Methods

### decodepayreq

**Syntax:** lncli decodepayreq \<payment\_request>

**Description:** DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment request.

**Key Parameters:**

- payment\_request - The Lightning Network payment request (invoice) string to decode

**Usage Example:**

:::BlockQuote
lncli decodepayreq lnbc10u1p30rpd4pp5zuewvg8ltvet6exlm7r6jv3tqrgw4t6h...
:::

### deleteallpayments

**Syntax:** lncli deletepayments --all \[--include\_non\_failed]

**Description:** DeleteAllPayments deletes all outgoing payments from the database. Note that it will not attempt to delete In-Flight payments, since that would be unsafe. By default, only failed payments are deleted.

**Key Parameters:**

- \--all - Delete all payments
- \--include\_non\_failed - Include successful payments in deletion (optional, false by default)

**Usage Examples:**

:::BlockQuote
lncli deletepayments --all
lncli deletepayments --all --include\_non\_failed
:::

### deletepayment

**Syntax:** lncli deletepayments \<payment\_hash> \[--include\_non\_failed]

**Description:** DeletePayment deletes a specific outgoing payment from the database by its payment hash. Note that it will not attempt to delete an In-Flight payment, since that would be unsafe.

**Key Parameters:**

- payment\_hash - The hex-encoded payment hash of the payment to delete
- \--include\_non\_failed - Allow deletion of successful payments (optional, false by default)

**Usage Example:**

:::BlockQuote
lncli deletepayments 8d54fb2afe6e35f36f3e6055fa062b2f3fd11e67b0d287618471477fde80f3a2
:::

### listpayments

**Syntax:** lncli listpayments \[--include\_incomplete] \[--index\_offset=\<offset>] \[--max\_payments=\<num>] \[--reversed]

**Description:** ListPayments returns a list of all outgoing payments made by the node.

**Key Parameters:**

- \--include\_incomplete - Include incomplete (failed/pending) payments in the list
- \--index\_offset - The index of a payment used as an offset point
- \--max\_payments - The maximum number of payments to return
- \--reversed - Return payments in reverse chronological order

**Usage Examples:**

:::BlockQuote
lncli listpayments
lncli listpayments --include\_incomplete
lncli listpayments --max\_payments=10 --reversed
:::

### trackpayment

**Syntax:** lncli trackpayment \[--json] \<payment\_hash>

**Description:** Track progress of an existing payment. Pick up monitoring the progression of a previously initiated payment specified by the hash argument.

**Key Parameters:**

- payment\_hash - The hex-encoded payment hash to track
- \--json - Output payment updates as JSON messages

**Usage Example:**

:::BlockQuote
lncli trackpayment f0deb18409273472d7d2a6c36056af8e9f55fce77fa3f9f76d2a095f79bd58cb
:::

### sendpayment

**Syntax:** lncli sendpayment \[options] --pay\_req=\<payment\_request> OR lncli sendpayment \[options] \<dest> \<amt> \[payment\_hash] \[final\_cltv\_delta]

**Description:** Send a payment over Lightning. Can either use a payment request (invoice) or manually specify payment parameters. **Note: This command is deprecated in favor of routerrpc.SendPaymentV2 in newer versions.**

**Key Parameters:**

- \--pay\_req - Payment request (invoice) to pay
- \--dest - Destination public key (hex)
- \--amt - Amount in satoshis
- \--keysend - Send spontaneous payment without invoice
- \--amp - Use Atomic Multi-path Payments
- \--fee\_limit - Maximum fee in satoshis
- \--fee\_limit\_percent - Maximum fee as percentage of payment amount
- \--timeout - Payment timeout in seconds

**Usage Examples:**

:::BlockQuote
lncli sendpayment --pay\_req=lnbc10u1p30rpd4pp5zuewvg8ltvet6exlm7r6jv3tqrgw4t6h...
lncli sendpayment --dest 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f --amt 1000 --keysend
:::

## Advanced Methods

### Channel Management

channelacceptor

**Syntax:** lncli channelacceptor

**Description:** Dispatches a bi-directional streaming RPC that allows node operators to accept or reject inbound channel open requests based on custom criteria. Creates a persistent connection where OpenChannel requests are sent to the client, and the client responds with acceptance/rejection decisions.

**Key Features:**

- Streaming RPC maintaining persistent connection for real-time channel requests
- Custom control over channel acceptance criteria
- Can modify channel parameters like CSV delay, reserve amounts, etc.

**Usage Example:**

:::BlockQuote
lncli channelacceptor
:::

closechannel

**Syntax:** lncli closechannel \[flags] funding\_txid output\_index OR lncli closechannel \[flags] --chan\_point=funding\_txid\:output\_index

**Description:** Closes an active channel identified by its channel outpoint (funding transaction ID and output index). Supports both cooperative and unilateral (force) closures with extensive fee control options.

**Key Parameters:**

- \--force - Attempt unilateral (force) closure
- \--block - Wait for channel close confirmation
- \--conf\_target=\<blocks> - Target confirmation blocks for fee estimation
- \--sat\_per\_vbyte=\<amount> - Manual fee rate in sat/vbyte
- \--delivery\_addr=\<address> - Address to send funds on cooperative close

**Usage Examples:**

:::BlockQuote
lncli closechannel --conf\_target=6 83b5a55b21255915dbc0d005230b2c026a004c839edaa716247b96b66490c66a 1
lncli closechannel --force 83b5a55b21255915dbc0d005230b2c026a004c839edaa716247b96b66490c66a 1
:::

closedchannels

**Syntax:** lncli closedchannels \[flags]

**Description:** Returns a description of all closed channels that the node was a participant in. Only shows channels that are fully resolved on-chain.

**Key Parameters:**

- \--cooperative - Show only cooperatively closed channels
- \--local\_force - Show only locally force-closed channels
- \--remote\_force - Show only remotely force-closed channels
- \--breach - Show only breach remedy transactions
- \--funding\_canceled - Show only channels where funding was canceled
- \--abandoned - Show only abandoned channels

**Usage Example:**

:::BlockQuote
lncli closedchannels
lncli closedchannels --cooperative
:::

getchaninfo

**Syntax:** lncli getchaninfo \[flags] \<chan\_id> OR lncli getchaninfo --chan\_point=\<txid\:index>

**Description:** Returns detailed authenticated network announcement information for a specific channel, identified by either its compact channel ID or channel point.

**Key Parameters:**

- chan\_id - 8-byte compact channel ID (uint64)
- \--chan\_point=\<txid\:index> - Channel point format (alternative to chan\_id)

**Usage Example:**

:::BlockQuote
lncli getchaninfo 1382286227238092801
lncli getchaninfo --chan\_point=83b5a55b21255915dbc0d005230b2c026a004c839edaa716247b96b66490c66a:1
:::

listchannels

**Syntax:** lncli listchannels \[flags]

**Description:** Returns a description of all open channels that the node is a participant in. Provides comprehensive filtering options for channel states.

**Key Parameters:**

- \--active\_only - Show only currently active channels
- \--inactive\_only - Show only currently inactive channels
- \--public\_only - Show only public channels (announced to network)
- \--private\_only - Show only private channels (not announced)
- \--peer=\<pubkey> - Show channels with specific peer

**Usage Examples:**

:::BlockQuote
lncli listchannels
lncli listchannels --active\_only
lncli listchannels --peer=026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2
:::

openchannel

**Syntax:** lncli openchannel \[flags] \<node\_key> \<local\_amt> \[push\_amt]

**Description:** Opens a new lightning channel to an existing peer. Supports extensive customization of channel parameters, funding options, and fee policies.

**Key Parameters:**

- \--connect=\<host\:port> - Connect to peer before opening channel
- \--private - Make channel private (not announced to network)
- \--conf\_target=\<blocks> - Target confirmation time
- \--sat\_per\_vbyte=\<amount> - Manual fee rate
- \--min\_htlc\_msat=\<amount> - Minimum HTLC value (default: 1000)
- \--base\_fee\_msat=\<amount> - Base fee for forwarding (default: 1000)
- \--fee\_rate\_ppm=\<amount> - Fee rate in parts per million (default: 1)
- \--zero\_conf - Attempt zero-confirmation channel
- \--channel\_type=\<type> - Channel type ("tweakless", "anchors", "taproot")

**Usage Examples:**

:::BlockQuote
lncli openchannel 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2 1000000
lncli openchannel --connect=node.example.com:9735 --sat\_per\_vbyte=5 --private 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2 1000000
:::

pendingchannels

**Syntax:** lncli pendingchannels \[flags]

**Description:** Displays information about channels in various pending states - those waiting for confirmations, in the process of closing, or with time-locked funds.

**Key Parameters:**

- \--include\_raw\_tx - Include raw transaction hex for waiting close channels

**Usage Example:**

:::BlockQuote
lncli pendingchannels
lncli pendingchannels --include\_raw\_tx
:::

subscribechannelevents

**Syntax:** lncli subscribechannelevents

**Description:** Creates a uni-directional stream from server to client that sends real-time updates about channel state changes. Essential for monitoring channel lifecycle events.

**Usage Example:**

:::BlockQuote
lncli subscribechannelevents
:::

### On-Chain Methods

estimatefee

**Syntax:** lncli estimatefee \[command options] send-json-string \[--conf\_target=N]

**Description:** Get fee estimates for sending bitcoin on-chain to multiple addresses. EstimateFee asks the chain backend to estimate the fee rate and total fees for a transaction that pays to multiple specified outputs.

**Key Parameters:**

- send-json-string - JSON string encoding addresses and amounts: '\{"ExampleAddr": NumCoinsInSatoshis}'
- \--conf\_target - Number of blocks that the transaction should confirm in (optional)
- \--coin\_selection\_strategy - Strategy for selecting coins ('largest', 'random', or 'global-config')

**Usage Example:**

:::BlockQuote
lncli estimatefee '\{"bc1q8wymjatcv5xpfm4uav2pwtw534t4u0tfup2xgg": 100000}' --conf\_target 6
:::

gettransactions (listchaintxns)

**Syntax:** lncli listchaintxns \[command options]

**Description:** Returns a list describing all the known transactions relevant to the wallet. Lists transactions from the wallet including on-chain transactions that pay to or are spends from lnd.

**Key Parameters:**

- \--start\_height - The block height from which to start listing transactions
- \--end\_height - The block height up to which to list transactions (use -1 for unconfirmed only)
- \--account - An optional filter to only include transactions relevant to an account

**Usage Examples:**

:::BlockQuote
lncli listchaintxns
lncli listchaintxns --start\_height 818181 --end\_height -1
:::

newaddress

**Syntax:** lncli newaddress \[address\_type]

**Description:** Generates a new address under control of the local wallet. Creates a new address for receiving on-chain bitcoin payments.

**Key Parameters (Address Types):**

- p2wkh - Pay-to-Witness-PubkeyHash (native segwit, bech32)
- np2wkh - Nested-Pay-to-Witness-PubkeyHash (legacy segwit)
- p2tr - Pay-to-Taproot (taproot addresses, bech32m)

**Usage Examples:**

:::BlockQuote
lncli newaddress p2tr
lncli newaddress p2wkh
:::

listunspent

**Syntax:** lncli listunspent \[command options]

**Description:** Lists utxos available for spending. Returns a list of all unspent transaction outputs (UTXOs) that are under the control of the wallet.

**Key Parameters:**

- \--min\_confs - The minimum number of confirmations required for UTXOs (default: 1)
- \--max\_confs - The maximum number of confirmations for UTXOs
- \--account - An optional filter to only include UTXOs from a specific account

**Usage Examples:**

:::BlockQuote
lncli listunspent
lncli listunspent --min\_confs 3
:::

listaddresses

*Note: This command is not available in current LND versions. Address generation is handled through newaddress and transaction history via listchaintxns.*

sendcoins

**Syntax:** lncli sendcoins \[command options] addr amt

**Description:** SendCoins executes a request to send coins to a particular address. Unlike SendMany, this RPC call only allows creating a single output at a time.

**Key Parameters:**

- \--addr - The bitcoin address to send coins to
- \--amt - The number of bitcoin denominated in satoshis to send
- \--conf\_target - The number of blocks that the transaction should confirm in (optional)
- \--sat\_per\_vbyte - Manual fee rate in sat/vByte (optional)
- \--send\_all - Send all wallet funds
- \--label - A label for the transaction

**Usage Examples:**

:::BlockQuote
lncli sendcoins --addr bc1q8wymjatcv5xpfm4uav2pwtw534t4u0tfup2xgg --amt 100000
lncli sendcoins --addr bc1q8wymjatcv5xpfm4uav2pwtw534t4u0tfup2xgg --amt 100000 --conf\_target 3
:::

sendmany

**Syntax:** lncli sendmany \[command options] send-json-string

**Description:** SendMany handles a request for a transaction that creates multiple specified outputs in parallel. Allows creating a transaction with multiple outputs in a single transaction.

**Key Parameters:**

- send-json-string - JSON string encoding addresses and amounts: '\{"ExampleAddr": NumCoinsInSatoshis}'
- \--conf\_target - Number of blocks for confirmation (optional)
- \--sat\_per\_vbyte - Manual fee rate in sat/vByte (optional)
- \--label - A label for the transaction

**Usage Examples:**

:::BlockQuote
lncli sendmany '\{"bc1q8wymjatcv5xpfm4uav2pwtw534t4u0tfup2xgg": 100000, "bc1qgxpuyfw8n7hrm8qkp3y9bqyqy1c7jf4h8c2s1v": 200000}'
lncli sendmany '\{"addr1": 50000, "addr2": 75000}' --conf\_target 6
:::

subscribetransactions

*Note: This is a streaming RPC with no direct CLI command. Accessible via gRPC/REST API for real-time transaction notifications.*

### Peer Methods

connect

**Syntax:** lncli connect \[command options] \<pubkey>@host

**Description:** ConnectPeer attempts to establish a connection to a remote peer. This is at the networking level and is used for communication between nodes. This is distinct from establishing a channel with a peer.

**Key Parameters:**

- \<pubkey>@host - Target address in format "pubkey\@host\:port"
- \--perm - If set, the daemon will attempt to persistently connect to the target peer

**Usage Examples:**

:::BlockQuote
lncli connect 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2\@34.239.230.56:9735
lncli connect --perm 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2\@example.onion:9735
:::

disconnect

**Syntax:** lncli disconnect \[command options] \<pubkey>

**Description:** DisconnectPeer attempts to disconnect one peer from another identified by a given pubKey. In the case that there are pending or active channels with the target peer, this action will not be allowed.

**Key Parameters:**

- \<pubkey> - The hex-encoded compressed public key of the peer to disconnect

**Usage Example:**

:::BlockQuote
lncli disconnect 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2
:::

listpeers

**Syntax:** lncli listpeers

**Description:** ListPeers returns a verbose listing of all currently active peers. Shows detailed information about currently connected peers including their connection status and features.

**Usage Example:**

:::BlockQuote
lncli listpeers
:::

subscribepeerevents

*Note: This is a streaming RPC with no direct CLI command. Accessible via gRPC/REST API for real-time peer online/offline events.*

### Routing Methods

buildroute

**Syntax:** lncli buildroute \[command options] \[arguments...]

**Description:** Builds a fully specified route based on a list of hop public keys. Retrieves relevant channel policies from the graph to calculate correct fees and time locks.

**Key Parameters:**

- \--hops - Comma separated hex pubkeys defining the route path
- \--amt - Amount to send in satoshis
- \--final\_cltv\_delta - Blocks for last hop to reveal preimage
- \--outgoing\_chan\_id - Short channel ID for first hop
- \--payment\_addr - Hex encoded payment address for last hop's MPP record

**Usage Examples:**

:::BlockQuote
lncli buildroute --hops=03node1...,03node2...,03node3... --amt=100000
lncli buildroute --hops=03abc...,03def... --final\_cltv\_delta=144 --payment\_addr=1a2b3c... --amt=50000
:::

estimateroutefee

**Syntax:** lncli estimateroutefee \[command options] dest amt

**Description:** Allows callers to obtain a lower bound estimate of how much it may cost to send an HTLC to a target destination.

**Key Parameters:**

- dest - Destination node public key (bytes)
- amt\_sat - Amount in satoshis (int64)

**Usage Example:**

:::BlockQuote
lncli estimateroutefee 03abc123...def456 100000
:::

sendtoroute

**Syntax:** lncli sendtoroute \[command options] \[arguments...]

**Description:** **⚠️ DEPRECATED** - Sends a payment over Lightning using a specific pre-defined route. Must specify the route and payment hash.

**Key Parameters:**

- \--payment\_hash - Hash to use within payment's HTLC
- \--routes - JSON array string in queryroutes/buildroute response format

**Usage Example:**

:::BlockQuote
lncli queryroutes 03abc123...def456 100000 | lncli sendtoroute --payment\_hash=a1b2c3... -
:::

queryroutes

**Syntax:** lncli queryroutes \[command options] dest amt

**Description:** Queries the channel router for potential payment paths to a destination node that have sufficient flow for the specified amount, including fees.

**Key Parameters:**

- dest - 33-byte hex-encoded public key of payment destination
- amt - Amount to send in satoshis
- \--fee\_limit - Maximum fee allowed in satoshis
- \--fee\_limit\_percent - Percentage of payment amount used as max fee
- \--final\_cltv\_delta - Number of blocks last hop has to reveal preimage
- \--use\_mc - Use mission control probabilities for pathfinding

**Usage Examples:**

:::BlockQuote
lncli queryroutes 03abc123...def456 100000
lncli queryroutes --fee\_limit=1000 --use\_mc 03abc123...def456 50000
:::

describegraph

**Syntax:** lncli describegraph \[command options] \[arguments...]

**Description:** Returns a description of the latest Lightning Network graph state from the node's perspective, including all nodes/vertices and edges (channels) connecting them.

**Key Parameters:**

- \--include\_unannounced - Include unannounced channels (both private channels and unannounced public channels)
- \--include\_auth\_proof - Include announcement signatures in ChannelEdge data

**Usage Examples:**

:::BlockQuote
lncli describegraph
lncli describegraph --include\_unannounced
:::

### HODL Invoices

addhodlinvoice

**Syntax:** lncli addhodlinvoice \[options] \<hash> \[amount]

**Description:** Add a new hold invoice. Creates a hold invoice that ties the invoice to a hash supplied in the request. Unlike regular invoices, HODL invoices allow the receiver to delay settlement until they manually settle or cancel the invoice.

**Key Parameters:**

- hash - 32-byte hex-encoded hash for the HODL invoice
- amount - Amount in satoshis (positional argument)
- \--memo - Description of the payment (optional)
- \--amt - Amount in satoshis (alternative to positional)
- \--expiry - Invoice expiry time in seconds (default: 86400 seconds/24 hours)
- \--private - Include routing hints for private channels

**Usage Examples:**

:::BlockQuote
lncli addhodlinvoice dd4344345192b48fc9d6359620d255b61559d62557f855f1bc5ff49a58543521 50000
lncli addhodlinvoice --memo="Escrow payment" --expiry=7200 dd4344345192b48fc9d6359620d255b61559d62557f855f1bc5ff49a58543521 100000
:::

settleinvoice

**Syntax:** lncli settleinvoice \[--preimage=\<preimage>] \<preimage>

**Description:** Reveal a preimage and use it to settle the corresponding HODL invoice. This releases the held HTLC and completes the payment.

**Key Parameters:**

- preimage - The hex-encoded preimage (32 bytes) which will allow settling an incoming HTLC

**Usage Examples:**

:::BlockQuote
lncli settleinvoice 3132333435363738393031323334353637383930313233343536373839303332
lncli settleinvoice --preimage=3132333435363738393031323334353637383930313233343536373839303332
:::

## Global Options

All LNCLI commands support these global options:

- \--rpcserver - host\:port of LN daemon (default: "localhost:10009")
- \--lnddir - path to LND's base directory (default: "\~/.lnd")
- \--tlscertpath - path to TLS certificate
- \--macaroonpath - path to macaroon file
- \--no-macaroons - disable macaroon authentication
- \--network - the network LND is running on (mainnet/testnet/simnet)

## Version Compatibility Notes

- Commands documented are compatible with LND versions 0.17.x and 0.18.x
- The cancelinvoice command was introduced in LND v0.8.0
- sendpayment is deprecated in favor of routerrpc.SendPaymentV2
- sendtoroute is deprecated and will be removed in future versions
- Some parameter names and output formats may vary between versions
- Always use lncli \<command> --help to see version-specific options

