pub fn pay_zero_value_invoice_with_id<C>(
invoice: &Bolt11Invoice,
amount_msats: u64,
payment_id: PaymentId,
retry_strategy: Retry,
channelmanager: C,
) -> Result<(), PaymentError>
Expand description
Pays the given zero-value Bolt11Invoice
using the given amount and 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_zero_value_invoice
for a variant which uses the PaymentHash
for the
idempotency token.