+ /// Indicates a [`Bolt12Invoice`] in response to an [`InvoiceRequest`] or a [`Refund`] was
+ /// received.
+ ///
+ /// This event will only be generated if [`UserConfig::manually_handle_bolt12_invoices`] is set.
+ /// Use [`ChannelManager::send_payment_for_bolt12_invoice`] to pay the invoice or
+ /// [`ChannelManager::abandon_payment`] to abandon the associated payment. See those docs for
+ /// further details.
+ ///
+ /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ /// [`Refund`]: crate::offers::refund::Refund
+ /// [`UserConfig::manually_handle_bolt12_invoices`]: crate::util::config::UserConfig::manually_handle_bolt12_invoices
+ /// [`ChannelManager::send_payment_for_bolt12_invoice`]: crate::ln::channelmanager::ChannelManager::send_payment_for_bolt12_invoice
+ /// [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
+ InvoiceReceived {
+ /// The `payment_id` associated with payment for the invoice.
+ payment_id: PaymentId,
+ /// The invoice to pay.
+ invoice: Bolt12Invoice,
+ /// A responder for replying with an [`InvoiceError`] if needed.
+ ///
+ /// `None` if the invoice wasn't sent with a reply path.
+ ///
+ /// [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
+ responder: Option<Responder>,
+ },