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