Function pay_invoice_with_id
pub fn pay_invoice_with_id<C>(
invoice: &Bolt11Invoice,
payment_id: PaymentId,
retry_strategy: Retry,
channelmanager: C,
) -> Result<(), PaymentError>
Expand description
Pays the given Bolt11Invoice
with a custom idempotency key, retrying if needed based on
Retry
.
Note that idempotency is only guaranteed as long as the payment is still pending. Once the payment completes or fails, no idempotency guarantees are made.
You should ensure that the Bolt11Invoice::payment_hash
is unique and the same
PaymentHash
has never been paid before.
See pay_invoice
for a variant which uses the PaymentHash
for the idempotency token.