@@ -7141,18 +7141,22 @@ where
7141
7141
/// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
7142
7142
/// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The
7143
7143
/// optional parameters are used in the builder, if `Some`:
7144
- /// - `quantity` for [`InvoiceRequest::quantity`] which may be set if
7144
+ /// - `quantity` for [`InvoiceRequest::quantity`] which must be set if
7145
7145
/// [`Offer::expects_quantity`] is `true`.
7146
7146
/// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
7147
7147
/// - `payer_note` for [`InvoiceRequest::payer_note`].
7148
7148
///
7149
- /// The provided `payment_id` is used to ensure that only one invoice is paid for the request.
7149
+ /// The provided `payment_id` is used to ensure that only one invoice is paid for the request
7150
+ /// when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
7151
+ /// been sent. Errors if a duplicate `payment_id` is provided given the caveats in the
7152
+ /// aforementioned link.
7150
7153
///
7151
7154
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
7152
7155
/// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
7153
7156
/// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
7154
7157
/// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
7155
7158
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
7159
+ /// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
7156
7160
pub fn pay_for_offer(
7157
7161
&self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
7158
7162
payer_note: Option<String>, payment_id: PaymentId, retry_strategy: Retry,
0 commit comments