When I create an invoice, the payment reaches my node and enters a channel with inbound available.
Is it possible to choose the channel I want to receive it on?
Afaik, you can only define last-hops paying an invoice.
Bolt11 allows including hop hints for private channels to find a route.
In case you you create the invoice and pay it by yourself, you could create the invoice, and then define the last hop with lncli payinvoice
.
admin@debian-nuc ~ ฿ lncli payinvoice -h
NAME:
lncli payinvoice - Pay an invoice over lightning.
USAGE:
lncli payinvoice [command options] pay_req
CATEGORY:
Payments
OPTIONS:
--pay_req value a zpay32 encoded payment request to fulfill
--fee_limit value maximum fee allowed in satoshis when sending the payment (default: 0)
--fee_limit_percent value percentage of the payment's amount used as the maximum fee allowed when sending the payment (default: 0)
--timeout value the maximum amount of time we should spend trying to fulfill the payment, failing after the timeout has elapsed (default: 1m0s)
--cltv_limit value the maximum time lock that may be used for this payment (default: 0)
--last_hop value pubkey of the last hop (penultimate node in the path) to route through for this payment
--outgoing_chan_id value short channel id of the outgoing channel to use for the first hop of the payment (default: 0)
--force, -f will skip payment request confirmation
--allow_self_payment allow sending a circular payment to self
--data value attach custom data to the payment. The required format is: <record_id>=<hex_value>,<record_id>=<hex_value>,.. For example: --data 3438382=0a21ff. Custom record ids start from 65536.
--inflight_updates if set, intermediate payment state updates will be displayed. Only valid in combination with --json.
--max_parts value the maximum number of partial payments that may be used (default: 16)
--json if set, payment updates are printed as json messages. Set by default on Windows because table formatting is unsupported.
--max_shard_size_sat value the largest payment split that should be attempted if payment splitting is required to attempt a payment, specified in satoshis (default: 0)
--max_shard_size_msat value the largest payment split that should be attempted if payment splitting is required to attempt a payment, specified in milli-satoshis (default: 0)
--amp if set to true, then AMP will be used to complete the payment
--time_pref value (optional) expresses time preference (range -1 to 1) (default: 0)
--amt value (optional) number of satoshis to fulfill the invoice (default: 0)
.
1 Like