@@ -7141,18 +7141,22 @@ where
71417141 /// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
71427142 /// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The
71437143 /// 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
71457145 /// [`Offer::expects_quantity`] is `true`.
71467146 /// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
71477147 /// - `payer_note` for [`InvoiceRequest::payer_note`].
71487148 ///
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.
71507153 ///
71517154 /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
71527155 /// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
71537156 /// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
71547157 /// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
71557158 /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
7159+ /// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
71567160 pub fn pay_for_offer(
71577161 &self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
71587162 payer_note: Option<String>, payment_id: PaymentId, retry_strategy: Retry,
0 commit comments