sendamount

sendamount -- Command to send a fixed amount

SYNOPSIS

sendamount invstring amount_msat [maxfee] [layers] [retry_for] [maxdelay] [payer_note] [label]

DESCRIPTION

Command added in v26.06.

The sendamount RPC command attempts to send a fixed amount to the given destination. This means fees are deducted from that amount, hence the received value at the destination may vary depending on the chosen route.

  • invstring (string): A bolt12 (non-recursive) offer with no specific amount or a BIP353 name. It can also pay to a Bolt11 invoice as long as the amount is un-specified.
  • amount_msat (msat): The desired amount to be spent with this payment, ie. we will send this value while the destination will receive this minus fees. amount_msat is in millisatoshi precision; it can be 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.
  • maxfee (msat, optional): maxfee creates an absolute limit on what fee will be paid. The default is For amount_msat smaller than 10sat it is 50%, for amount_msat between 10sat and 500sat maxfee is 5sat, while for amount_msat greater than 500sat it is 1%..
  • layers (array of strings, optional): These are askrene layers to apply in addition to 'xpay' layer: 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. The default is 60 seconds.
  • maxdelay (u32, optional): A payment may be delayed for up to maxdelay blocks by another node; clients should be prepared for this worst case. The default is 2016.
  • payer_note (string, optional): A message that a payer is willing to send to a payee within an invoice request.
  • label (string, optional): Attach a label to payments for which is returned in listpays and listsendpays. This is for your own use: it is not visible to the recipient.

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).

ERRORS

The following error codes may occur:

  • -1: Catchall nonspecific error.
  • 203: Permanent failure from destination (e.g. it said it didn't recognize invoice)
  • 205: Couldn't find, or find a way to, the destination.
  • 207: Invoice has expired.
  • 219: Invoice has already been paid.
  • 209: Other payment error.

AUTHOR

Lagrang3 [email protected] is mainly responsible.

SEE ALSO

lightning-xpay(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

EXAMPLES

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.