Function breez_sdk_core::lightning_invoice::payment::pay_invoice
pub fn pay_invoice<C>(
invoice: &Bolt11Invoice,
retry_strategy: Retry,
channelmanager: C,
) -> Result<PaymentId, PaymentError>
Expand description
Pays the given Bolt11Invoice
, retrying if needed based on Retry
.
Bolt11Invoice::payment_hash
is used as the PaymentId
, which ensures idempotency as long
as the payment is still pending. If the payment succeeds, you must ensure that a second payment
with the same PaymentHash
is never sent.
If you wish to use a different payment idempotency token, see pay_invoice_with_id
.