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