xkeysend

xkeysend -- Send funds to a node without an invoice

SYNOPSIS

xkeysend destination amount_msat [label] [maxfee] [layers] [retry_for] [maxdelay] [extratlvs]

DESCRIPTION

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 the xkeysend command does not require an invoice, instead it uses the destination node ID, and amount to find a route to the specified node.

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.

This replaces the older keysend command.

  • 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 suffix msat or sat, or a three decimal point number with suffix sat, or an 1 to 11 decimal point number suffixed by btc.
  • label (string, optional): Attach a label to the payment for which is returned in listpays and listsendpays. This is for your own use: it is not visible to the recipient.
  • maxfee (msat, optional): maxfee creates 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. See askrene-create-layer.:
    • (string, optional): name of an existing layer
  • retry_for (u32, optional): Until retry_for seconds passes, the command will keep finding routes and retrying the payment. However, a payment may be delayed for up to maxdelay blocks by another node; clients should be prepared for this worst case. The default is 60 seconds.
  • 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 this payment_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 [email protected] is mainly responsible.

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

Core Lightning is Blockstream's open-source implementation of the Lightning Network optimised for performance. It is highly customizable through modular expandability.

© 2026 Core Lightning, a Blockstream project.
All rights reserved.

X Twitter Logo Streamline Icon: https://streamlinehq.com

X

The official Core Lightning X(Twitter) handle to follow project updates and announcements.

Github Logo 2 Streamline Icon: https://streamlinehq.com

Github

Github repository for source code, issues, and contributions. Visit our project here to explore or contibute.

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/V6ay9yNhBQ to join.