Class QuoteRequest
A quote request contains the minimum required information to generate a cost estimate for a payment between two parties. It specifies the sender's wallet address, the receiver's incoming payment endpoint, and the payment method to be used.
Quote requests are used in step 3 of the Interledger payment flow to obtain pricing information before executing the actual payment. The quote request must include either a debit amount or receive amount (or rely on the receiver's incoming payment amount) to calculate accurate fees and exchange rates.
This class represents the subset of the quote schema accepted as input to create a new quote resource on the Interledger server.
- Since:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteRequestCreates a new QuoteRequest with the specified parameters.
-
Field Details
-
walletAddress
The wallet address where the quote will be created.This identifies the sender's wallet address that is requesting the quote. It corresponds to the wallet that will be debited if the payment is executed using the resulting quote.
The wallet address must be a valid URI pointing to an Interledger wallet endpoint.
Example: "https://ilp.interledger-test.dev/alice"
-
receiver
The receiver (incoming payment) endpoint for the quote.This specifies the destination where the payment will be delivered if executed using the resulting quote. It must be a valid incoming payment URI that identifies a specific payment destination.
The receiver URI is used to determine the target wallet's capabilities, supported currencies, and any existing incoming payment amount that may influence the quote calculation.
Example: "https://ilp.interledger-test.dev/incoming-payments/123e4567-e89b-12d3-a456-426614174000"
-
method
The payment method to be used for the quote.This specifies the protocol or mechanism that will be used to deliver the payment. For Interledger payments, this is typically "ilp" indicating the use of the Interledger Protocol.
The method affects the quote calculation as different payment methods may have different fee structures, routing costs, or exchange rate considerations.
Supported values:
- "ilp" - Interledger Protocol payment method
-
-
Constructor Details
-
QuoteRequest
public QuoteRequest()
-
-
Method Details
-
build
Creates a new QuoteRequest with the specified parameters.This factory method provides a convenient way to construct a quote request with all required fields. The resulting quote request can be used to request a quote from an Interledger server.
- Parameters:
walletAddress- the sender's wallet address where the quote will be createdreceiver- the receiver (incoming payment) endpoint URI as a stringmethod- the payment method to be used (typically "ilp")- Returns:
- a new QuoteRequest instance with the specified parameters
- Throws:
IllegalArgumentException- if any parameter is null or invalid
-