# Create quote collection Creates a collection of quotes for a proposed payment. Endpoint: POST /quote_collections Version: 4.0.0 Security: Bearer ## Request fields (application/json): - `sending_address` (string, required) RippleNet account name and address of the sender. Format: accountname@ripplenetaddress Example: new_york@rn.us.ny.new_york Example: "sf@rn.us.ca.san_francisco" - `receiving_address` (string, required) RippleNet account name and address of the receiver. Format: accountname@ripplenetaddress Example: new_york@rn.us.ny.new_york Example: "sf_gbp@rn.us.ca.san_francisco" - `amount` (string, required) Amount to be sent or received, depending on the quote_type. Use this table to determine what amount to assign. Example: "1" | Quote type | Amount | | --- | --- | | SENDER_AMOUNT | Amount to be sent by the payment originator | | SENDER_INSTITUTION_AMOUNT | Set to SENDER_INSTITUTION_AMOUNT to calculate the quote based on the amount to be sent, plus any fees collected by the sending institution | | RECEIVER_AMOUNT | Amount to be received by the payment beneficiary | | RECEIVER_INSTITUTION_AMOUNT | Set to RECEIVER_INSTITUTION_AMOUNT to calculate the quote based on the amount to be received, minus any fees collected by the receiving institution | Example: "1" - `currency` (string, required) Currency code of the amount to be sent or received, depending on the quote_type. Use this table to determine what currency code to assign. Example: USD | Quote type | Currency code description | | --- | --- | | SENDER_AMOUNT | Specify the currency code for the sending currency, for example USD | | SENDER_INSTITUTION_AMOUNT | Specify the currency code for the sending currency, for example USD | | RECEIVER_AMOUNT | Specify the currency code for the receiving currency, for example USD | | RECEIVER_INSTITUTION_AMOUNT | Specify the currency code for the receiving currency, for example USD | Example: "USD" - `quote_type` (string, required) Specifies how to calculate the quote. Example: SENDER_AMOUNT Enum: "SENDER_AMOUNT", "RECEIVER_AMOUNT", "SENDER_INSTITUTION_AMOUNT", "RECEIVER_INSTITUTION_AMOUNT" - `sender_or_receiver_currency` (string) Currency code of the sender or receiver based on quote_type. If provided, you can use this to filter the options for quotes. Example: "USD" - `custom_fee` (number) Custom fee for the sending account. Setting this field overrides all fees configured on the sender's RippleNet instance. - `custom_rate` (object) JSON request object to specify a custom exchange rate during quote collection generation. - `custom_rate.rate` (number, required) Exchange rate for a base and counter currency. - `custom_rate.base_currency` (string, required) Base currency of the exchange rate. - `custom_rate.counter_currency` (string, required) Counter currency of the exchange rate. - `custom_rate.rate_type` (string, required) Order type for the exchange rate. Valid values are sell or buy. When rate_type = buy, base_currency is source ccy and counter_currency is destination ccy. When rate_type = sell, base_currency is destination ccy and counter_currency is source ccy. Enum: "buy", "sell" - `quote_route` (array) Custom route that quote must follow. Provide an array of RippleNet address strings that convey the route the quote must follow. Example: g.us.ca.san_francisco Example: ["rn.us.ca.san_francisco","rn.us.tx.austin","rn.us.ny.new_york"] - `payment_method` (string) Payout method for the quote. Senders can use this field to define the payout method that the receiver should use to deliver the payment to end customer. On-Demand Liquidity (ODL) receivers should set payment_method to the outlet_id or the string none (not an empty value) to keep funds at the destination exchange when paying out to a local rail. Caution: The existing quote parameter is named payment_method while elsewhere it is payout_method. - `enable_quote_per_payout_method` (boolean) Enable this flag to generate quotes using payout methods configured by the receiver. Example: true - `digital_asset_origination` (boolean) When true, this flag tells RippleNet to provide a full quote as if the payment originates in the specified source fiat currency. The quote for the source exchange excludes trading fees. On execution, the source exchange trade is skipped, and XRP is withdrawn from the source exchange as the first step. - `force_path_finding_and_liquidity_path_finding` (boolean) When true, this flag tells RippleNet to ignore cached value for path finding and liquidity path finding. Force performing new path finding and liquidity path finding. - `payout_method_category` (string) Category the payout method will be associated with. Defaults to OTHER if not specified. Enum: "REAL_TIME_GROSS_SETTLEMENT_SYSTEM", "REAL_TIME_NET_SETTLEMENT_SYSTEM", "MASS_NET_PAYMENT_SYSTEM", "BOOK_TRANSFER", "CASH_PAYOUT", "WALLET_PAYMENT", "OTHER" - `sender_segregated_account` (string) RippleNet account name and address of the sender owned account at receiver to be used for failure conversion (in case of payment failure). Format: accountname@ripplenetaddress Example: new_york@rn.us.ny.new_york Example: "conct_php_receiver_coins_sender@receiver" - `quote_limit` (integer) Flag for truncating the total amount of quotes to a maximum amount after sorting and filters are applied. Optional. - `quote_filter_types` (array) Filter on a type of quote. Enum: "LIQUIDITY_WARNINGS", "QUOTE_ERRORS" ## Response 200 fields (application/json): - `quote_collection_id` (string, required) Unique identifier of the quote collection. Example: "4711728c-cd35-49ec-96a5-72732b4333ec" - `quotes` (array, required) For more information on quote elements, see [Create quote collections](/products/payments-odl/api-docs/ripplenet/tutorials/configure-fees#create-quote-collections). - `quotes.quote_id` (string, required) Unique identifier for the quote. Example: "2a547e56-4aac-4375-86a8-8b3e7014801d" - `quotes.created_at` (string, required) Date and time at which the quote was created, as an ISO-8601 timestamp in UTC. Example: "2020-01-29T20:59:44.925Z" - `quotes.expires_at` (string, required) Date and time after which the quote and its pricing expire, as an ISO-8601 timestamp in UTC. Example: "2020-01-29T21:29:44.925Z" - `quotes.type` (string, required) Indicates how the amount field should be treated for calculating quote values. Enum: "SENDER_AMOUNT", "RECEIVER_AMOUNT", "SENDER_INSTITUTION_AMOUNT", "RECEIVER_INSTITUTION_AMOUNT", "REVERSAL_AMOUNT" - `quotes.price_guarantee` (string, required) Indicates whether a quote's pricing is INDICATIVE or FIRM. An INDICATIVE quote allows for price movements between quote issuance and payment execution, such that the quoted amount and delivered amount may differ. A FIRM quote ensures that the quoted and delivered payment amounts are equal. Example: "FIRM" - `quotes.sender_address` (string, required) RippleNet account name and address of the sender, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york. Example: "sf@rn.us.ca.san_francisco" - `quotes.receiver_address` (string, required) RippleNet account name and address of the receiver, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york. Example: "sf_gbp@rn.us.ca.san_francisco" - `quotes.amount` (string, required) Amount to be sent or received, depending on the type value. Example: "1" - `quotes.currency_code` (string, required) Currency code for the amount value. Example: "USD" - `quotes.currency_code_filter` (string, required) Currency code that can be used to filter quotes at the opposite end of the quote request. For example, you can filter by this currency code to find the receiving currency for a quote with a SENDER_AMOUNT quote_type. If not sent in the request, this field value is set to null. Example: "EUR" - `quotes.service_type` (string, required) Returns null. - `quotes.quote_elements` (array, required) Transfer and exchange elements. A transfer element represents a movement of funds between two accounts. An exchange element represents the exchange of currencies between two accounts. - `quotes.quote_elements.quote_element_id` (string, required) Unique identifier for the quote element. Example: "259189e7-cb14-42e7-99ef-375f3285e356" - `quotes.quote_elements.quote_element_type` (string, required) Type of quote element. TRANSFER represents the movement of funds between two accounts. EXCHANGE represents the exchange of currencies between two accounts. EXCHANGE_TRADE represents the exchange of fiat to digital currency on a digital exchange. CRYPTO_TRANSFER represents the movement of digital funds between two digital exchanges. Enum: "TRANSFER", "EXCHANGE", "EXCHANGE_TRADE", "CRYPTO_TRANSFER" - `quotes.quote_elements.quote_element_order` (string, required) Order of each quote element along the liquidity path. If a quote includes five quote elements, each one is enacted according to its quote_element_order number to make the proposed payment. Example: "1" - `quotes.quote_elements.sending_amount` (number, required) Amount the sender is sending. Example: 1 - `quotes.quote_elements.receiving_amount` (number, required) Amount the receiver is receiving. Example: 355 - `quotes.quote_elements.sending_fee` (number, required) Fees the sender is charging. When quote_element_type is set to EXCHANGE, this field value is always set to 0. - `quotes.quote_elements.receiving_fee` (number, required) Fees the receiver is charging. When quote_element_type is set to EXCHANGE, this field value is always set to 0. - `quotes.quote_elements.sending_currency_code` (string) Currency code of the sending amount. Included in quote elements with quote_element_type set to EXCHANGE. Example: "USD" - `quotes.quote_elements.receiving_currency_code` (string) Currency code of the receiving amount. Included in quote elements with quote_element_type set to EXCHANGE. Example: "GBP" - `quotes.quote_elements.fx_rate` (object) The details of an FX Rate for a quote or payment. - `quotes.quote_elements.fx_rate.rate` (number, required) Exchange rate between a base and counter currency. Example: 3.25 - `quotes.quote_elements.fx_rate.base_currency_code` (string, required) Currency code of the base currency. Example: "USD" - `quotes.quote_elements.fx_rate.counter_currency_code` (string, required) Currency code of the counter currency. Example: "GBP" - `quotes.quote_elements.fx_rate.type` (string, required) Order type of the exchange rate. Valid values are buy or sell. Example: "buy" - `quotes.quote_elements.transfer_currency_code` (string) Currency code of the transfer. Included in quote elements with quote_element_type set to TRANSFER. - `quotes.liquidity_warning` (string, required) Triggered when a quote causes an account to go below its minimum_allowed_balance. Otherwise, this field value is set to null. - `quotes.payment_method` (string) Payout method for the quote. Example: "LOCAL_RAILS" - `quotes.payment_method_fields` (string) JSON object containing payment method metadata. Example: "{\"category_id\":\"bank\",\"required_originator_fields\":[{\"field_name\":\"sender_address\",\"field_label\":\"Sender address\"}]}" - `quotes.payout_method_info` (object) Details about the payout method. - `quotes.payout_method_info.payout_method_name` (string) Payout method for the quote. Example: "Cash Payout" - `quotes.payout_method_info.payout_method_category` (string) Category of the payout method. Defaults to OTHER if not specified. Enum: "REAL_TIME_GROSS_SETTLEMENT_SYSTEM", "REAL_TIME_NET_SETTLEMENT_SYSTEM", "MASS_NET_PAYMENT_SYSTEM", "BOOK_TRANSFER", "CASH_PAYOUT", "WALLET_PAYMENT", "OTHER" - `quotes.payout_method_info.description` (string) User defined description of the payout method. Example: "local rails" - `quotes.payout_method_info.estimated_time_to_credit` (string) The estimated time to credit the beneficiary using this payout method. Example: "3 days" - `quote_errors` (array) - `quote_errors.failed_path` (array, required) Quote path that failed. - `quote_errors.failed_path.source` (string, required) RippleNet account name and address of the source account, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york. - `quote_errors.failed_path.destination` (string, required) RippleNet account name and address of the destination account, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york. - `quote_errors.failed_path.source_currency` (string, required) Currency associated with the source account. - `quote_errors.failed_path.destination_currency` (string, required) Currency associated with the destination account. - `quote_errors.failed_path.account_liquidity_relationship_id` (string) Unique identifier for an account liquidity relationship. Example: "480e3a6f-3bcd-48cd-9ce9-9d940aa3c9c6" - `quote_errors.failed_path.peer_liquidity_relationship_id` (string) Unique identifier for a peer liquidity relationship. Example: "480e3a6f-3bcd-48cd-9ce9-9d940aa3c9c6" - `quote_errors.error_origin` (string) RippleNet address of where the error originated. For example, rn.us.ny.new_york. - `quote_errors.error_message` (string, required) Message that describes the error. ## Response 400 fields (application/json): - `type` (string) URL to the error documentation. Example: "https://errors.ripplenet.ripple.com/error/json-processing-error" - `title` (string) Summary of the returned problem. Example: "Invalid Request Object" - `detail` (string) Description of the returned problem. Example: "The request parameter [account_id] is not in the correct format." - `status` (number) HTTP error code. Example: 400 - `ripplenet_error_code` (string) RippleNet specific error code. Example: "E0104" - `finality` (string) Specifies if the request can be retried for a successful response. Example: "PERMANENT"