4 * The reason the payment failed. Used in [`Event::PaymentFailed`].
6 public enum PaymentFailureReason {
8 * The intended recipient rejected our payment.
10 LDKPaymentFailureReason_RecipientRejected,
12 * The user chose to abandon this payment by calling [`ChannelManager::abandon_payment`].
14 * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
16 LDKPaymentFailureReason_UserAbandoned,
18 * We exhausted all of our retry attempts while trying to send the payment, or we
19 * exhausted the [`Retry::Timeout`] if the user set one. If at any point a retry
20 * attempt failed while being forwarded along the path, an [`Event::PaymentPathFailed`] will
21 * have come before this.
23 * [`Retry::Timeout`]: crate::ln::channelmanager::Retry::Timeout
25 LDKPaymentFailureReason_RetriesExhausted,
27 * The payment expired while retrying, based on the provided
28 * [`PaymentParameters::expiry_time`].
30 * [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
32 LDKPaymentFailureReason_PaymentExpired,
34 * We failed to find a route while retrying the payment.
36 LDKPaymentFailureReason_RouteNotFound,
38 * This error should generally never happen. This likely means that there is a problem with
41 LDKPaymentFailureReason_UnexpectedError,
42 ; static native void init();