# Spontaneous payments ## [Page](https://bitcoinops.org/en/topics/spontaneous-payments/) on [[Bitcoin Optech]] **Spontaneous payments** is the ability of one LN node to pay another node without receiving an invoice first. The invoice used for regular LN payments contains a hash that the payer and each routing node uses as part of the Hash-Time-Locked-Contract. Spontaneous payments need to replicate this security mechanism but without the invoice mechanism for communication. At least two different mechanisms have been proposed for accomplishing this: - _Add data to the routing packet (keysend):_ the person sending the payment chooses a hash pre-image, encrypts it to the receiver’s key, and appends it as extra data in the routing packet. When the payment arrives at the receiver, they can decrypt the data and use the pre-image to claim the payment. - _Using a shared secret:_ the person sending the payment combines their key and the receiver’s key to create a shared secret. Then the spender uses a hash of this secret as the pre-image. The receiver can also generate a shared secret and can use it to accept the payment. **2021** - [LND #5803 allows multiple spontaneous payments to the same invoice](https://bitcoinops.org/en/newsletters/2021/11/03/#lnd-5803) - [LND #5108 adds support for spontaneous multipath payments using AMP](https://bitcoinops.org/en/newsletters/2021/04/14/#lnd-5108) - [Rust-Lightning #967 adds support for sending keysend-style spontaneous payments](https://bitcoinops.org/en/newsletters/2021/08/04/#rust-lightning-967) - [C-Lightning #4404 allows keysending to nodes that don’t advertise support](https://bitcoinops.org/en/newsletters/2021/03/17/#c-lightning-4404) ### [LND #5803](https://bitcoinops.org/en/newsletters/2021/11/03/#lnd-5803) [LND #5803](https://github.com/lightningnetwork/lnd/issues/5803) allows multiple [spontaneous payments](https://bitcoinops.org/en/topics/spontaneous-payments/) to the same [Atomic Multipath Payment (AMP)](https://bitcoinops.org/en/topics/multipath-payments/) invoice without requiring the spending user perform extra steps for repeat payments. The ability to receive multiple payments to the same invoice is a feature of AMP that’s not possible with existing [simplified multipath payment](https://bitcoinops.org/en/topics/multipath-payments/) implementations. ### [LND #5108](https://bitcoinops.org/en/newsletters/2021/04/14/#lnd-5108) [LND #5108](https://github.com/lightningnetwork/lnd/issues/5108) adds support for making spontaneous [Atomic Multipath Payments](https://bitcoinops.org/en/topics/multipath-payments/) (also called _Original AMPs_) using the low-level `sendtoroute` RPC. Original AMPs are non-interactive (or spontaneous) by nature as the spender selects all preimages. Spender preimage selection is also a part of keysend-style [spontaneous payments](https://bitcoinops.org/en/topics/spontaneous-payments/), which have been used for singlepath spontaneous payments. Follow-up PRs are expected to make spontaneous multipath payments available to the higher-level `sendpayment` RPC. ### [Rust-Lightning #967](https://bitcoinops.org/en/newsletters/2021/08/04/#rust-lightning-967) [Rust-Lightning #967](https://github.com/rust-bitcoin/rust-lightning/issues/967) adds support for making [keysend-style spontaneous payments](https://bitcoinops.org/en/topics/spontaneous-payments/#add-data-to-the-routing-packet) via the `send_spontaneous_payment` function call. With this change, all four LN implementations we cover will have support for keysend. The author has also submitted [corresponding documentation](https://github.com/lightning/bolts/issues/892) (yet unmerged) on keysend payments as a [BLIP](https://bitcoinops.org/en/newsletters/2021/07/07/#blips) (Bitcoin Lightning Improvement Proposals), a proposed way to document features and best practices which do not belong as part of the LN BOLTs specification.