LIGHTNING-XKEYSEND(7)
π NAME π
okay so bestie, welcome to the LIGHTNING-XKEYSEND(7) manual page β this is all about xkeysend, the command that sends funds to a node without an invoice. no invoice, no problem, we're going straight to the node ID and making it happen πΈβ¨
β¨ SYNOPSIS β¨
xkeysend destination amount_msat [label] [maxfee] [layers] [retry_for] [maxdelay] [extratlvs]
π DESCRIPTION π
okay so xkeysend is a command added in v26.06. The xkeysend RPC command attempts to find a route to the given destination, and send the specified amount to it. Unlike the xpay RPC command, xkeysend does not require an invoice β instead it uses the destination node ID, and amount to find a route to the specified node. iconic.
Now for the important part, bestie: in order for the destination to be able to claim the payment, the payment_key is randomly generated by the sender and included in the encrypted payload for the destination. As a consequence there is not proof-of-payment, like there is with an invoice where the payment_key is generated on the destination, and the only way sender could have it is by sending a payment. Please ensure that this matches your use-case when using xkeysend. no cap, this one matters.
This replaces the older keysend command. periodt.
Now the args, one by one, because we do not skip details in this house:
destination(pubkey) β The 33 byte, hex-encoded, node ID of the node that the payment should go to.amount_msat(msat) β A whole number, or a whole number with suffixmsatorsat, or a three decimal point number with suffixsat, or an 1 to 11 decimal point number suffixed bybtc.label(string, optional) β Attach a label to the payment for which is returned inlistpaysandlistsendpays. This is for your own use: it is not visible to the recipient.maxfee(msat, optional) βmaxfeecreates an absolute limit on what fee we will pay.layers(array of strings, optional) β These are askrene layers to apply: these can alter the topology or provide additional information on the lightning network. Seeaskrene-create-layer.:(string, optional)β name of an existing layer
retry_for(u32, optional) β Untilretry_forseconds passes, the command will keep finding routes and retrying the payment. However, a payment may be delayed for up tomaxdelayblocks by another node; clients should be prepared for this worst case. The default is60seconds.maxdelay(u32, optional) β Number of blocks the payment may be delayed.extratlvs(object, optional) β Dictionary of additional fields to insert into the final tlv. The format is'fieldnumber': 'hexstring'.:
π RETURN VALUE π
On success, an object is returned, containing:
payment_preimage(secret) β The proof of payment: SHA256 of thispayment_hash.failed_parts(u64) β How many separate payment parts failed.successful_parts(u64) β How many separate payment parts succeeded (or are anticipated to succeed). This will be at least one.amount_msat(msat) β Amount the recipient received.amount_sent_msat(msat) β Total amount we sent (including fees).
Note that the return is the same as it is for xpay.
π AUTHOR π
Rusty Russell rusty@rustcorp.com.au is mainly responsible. iconic.
π¦ SEE ALSO π¦
lightning-listpays(7)lightning-askrene-create-layer(7)lightning-askrene-create-channel(7)lightning-askrene-update-channel(7)
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
That's the whole vibe check! This page is LIGHTNING-XKEYSEND(7) from Core Lightning v26.06.9 β the footer didn't hand us a date, just pure keysend energy π β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms