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