# Accept quote Accepts a quote ID to start the payment process. Tutorials * Learn how to Accept a quote. * Learn how to Work with the user_info object. Endpoint: POST /payments/accept Version: Security: Bearer ## Request fields (application/json): - `quote_id` (string, required) ID of the quote to accept and continue as a payment. Example: "9bb53b3b-a774-43e2-9a1b-f18fbc3640f7" - `sender_end_to_end_id` (string, required) Sender-specified ID. - `internal_id` (string) Internal ID that the sender can specify. Only visible to the sender. Only the sending RippleNet instance stores this ID. - `user_info` (object, required) Your receiver defines the required [User info](/products/payments-direct/api-docs/working-with-user-info-object/) structure. Provide the structure as required by your use case. ## Response 200 fields (application/json): - `payment_id` (string, required) Unique identifier of a payment. Example: "d485f100-2af7-4e48-9ab1-3c7e28775691" - `contract_hash` (string, required) Hash of all values in the Contract object used to ensure immutability. The values in this object cannot change once a payment transitions into the PROCESSING_COMPLIANCE state. Example: "ccb23bd87f13cc13b9d616a9723f76e112aeac8628b2082e0f8bf3b8c670b103" - `payment_state` (string, required) State of the payment. Enum: "ACCEPTED", "PROCESSING_COMPLIANCE", "PREPARED", "EXECUTED", "COMPLETED", "FAILED" - `modified_at` (string, required) Date and time at which the payment was last modified, as an ISO-8601 timestamp in UTC. Example: "2019-10-01T18:25:47.347Z" - `contract` (object, required) Represents all immutable parts of a payment agreed upon by all participants as a part of the payment compliance processing flow. The values in this object cannot change once a payment transitions to the PROCESSING_COMPLIANCE state. - `contract.sender_end_to_end_id` (string, required) ID that the sender can specify. Persisted on all RippleNet instances that participate in the payment. - `contract.created_at` (string, required) Date and time at which this payment contract was created, as an ISO-8601 timestamp in UTC. Example: "2024-03-22T15:24:19.587Z" - `contract.expires_at` (string, required) Date and time after which this payment contract expires, as an ISO-8601 timestamp in UTC. Example: "2024-05-21T15:13:31.275Z" - `contract.quote` (object, required) JSON response object that represents a quote for a proposed payment or return payment. - `contract.quote.quote_id` (string, required) Unique identifier for the quote. Example: "2a547e56-4aac-4375-86a8-8b3e7014801d" - `contract.quote.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" - `contract.quote.expires_at` (string, required) Date and time after which the quote and its pricing expire. Example: "2020-01-29T21:29:44.925Z" - `contract.quote.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" - `contract.quote.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" - `contract.quote.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" - `contract.quote.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" - `contract.quote.amount` (number, required) Amount to be sent or received, depending on the type value. Example: 1 - `contract.quote.currency_code` (string, required) Currency code for the amount value. Example: "USD" - `contract.quote.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" - `contract.quote.service_type` (string, required) Returns null. - `contract.quote.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. - `contract.quote.quote_elements.quote_element_id` (string, required) Unique identifier for the quote element. Example: "259189e7-cb14-42e7-99ef-375f3285e356" - `contract.quote.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" - `contract.quote.quote_elements.quote_element_order` (integer, 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 - `contract.quote.quote_elements.sending_amount` (number, required) Amount the sender is sending. Example: 1 - `contract.quote.quote_elements.receiving_amount` (number, required) Amount the receiver is receiving. Example: 355 - `contract.quote.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. - `contract.quote.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. - `contract.quote.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" - `contract.quote.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" - `contract.quote.quote_elements.fx_rate` (object) The details of an FX Rate for a quote or payment. - `contract.quote.quote_elements.fx_rate.rate` (number, required) Exchange rate between a base and counter currency. Example: 3.25 - `contract.quote.quote_elements.fx_rate.base_currency_code` (string, required) Currency code of the base currency. - `contract.quote.quote_elements.fx_rate.counter_currency_code` (string, required) Currency code of the counter currency. - `contract.quote.quote_elements.fx_rate.type` (string, required) Order type of the exchange rate. Valid values are buy or sell. - `contract.quote.quote_elements.transfer_currency_code` (string) Currency code of the transfer. Included in quote elements with quote_element_type set to TRANSFER. - `contract.quote.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. - `contract.quote.payment_method` (string) Payout method for the quote. Example: "LOCAL_RAILS" - `contract.quote.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\"}]}" - `contract.quote.payout_method_info` (object) Details about the payout method. - `contract.quote.payout_method_info.payout_method_name` (string) Payout method for the quote. Example: "Cash Payout" - `contract.quote.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" - `contract.quote.payout_method_info.description` (string) User defined description of the payout method. Example: "local rails" - `contract.quote.payout_method_info.estimated_time_to_credit` (string) The estimated time to credit the beneficiary using this payout method. Example: "3 days" - `contract.fee_info` (object) Itemized list of fees charged by each node. - `contract.fee_info.nodes` (object, required) Fees charged by each node participating in the payment. - `contract.fee_info.total_fees` (array, required) Total fees charged in the payment, separated by currency. - `contract.fee_info.total_fees.total_fee` (number, required) Value of the total fee for the currency returned in fee_currency. - `contract.fee_info.total_fees.fee_currency` (string, required) ISO 4217 currency code of the currency the total fee applies to. - `ripplenet_info` (array) Application-provided data explaining actions taken by RippleNet applications. - `ripplenet_info.node_address` (string, required) RippleNet address of the node from which the RippleNetInfo originated. Example: "rn.us.ny.new_york" - `ripplenet_info.settlement_declined` (array, required) If applicable, provides an array of RippleNetInfoEntry's explaining transitions into the SETTLEMENT_DECLINED state - `ripplenet_info.settlement_declined.info` (string) Information explaining the action taken by a RippleNet application. Could be a RippleNet error code, or a written explanation of the action taken Example: "L001" - `ripplenet_info.settlement_declined.created_at` (string) The DateTime that this quote was created, as an ISO-8601 timestamp in UTC. Example: "2018-04-06T20:33:35Z" - `execution_condition` (string, required) A Base64-encoded execution condition for this payment, the fulfillment of which will be presented to the validator to complete this payment. This value must match the execution_condition in the associated crypto transaction. Example: "PrefixSha256Condition{subtypes=[ED25519-SHA-256], type=PREFIX-SHA-256, fingerprint=sfGGHCrkyaMsLQNB62w_4zarlPChHKm47JkXVQbs1z0, cost=132360}" - `crypto_transaction_id` (string, required) Unique identifier of the crypto transaction associated with this payment. Example: "4e05da26-7872-4a1f-b9b7-db7604757c37" - `validator` (string, required) Address of the validator that validated the payment. Example: "rn.us.ca.san_francisco" - `payment_type` (string, required) Payment type. Enum: "DIRECT" - `execution_results` (array, required) Represents the actual movement of funds in a payment. Each execution result corresponds to a quote element and represents its execution in a payment. - `execution_results.execution_result_id` (string, required) Unique identifier for this payment result. Example: "06f6d4e2-3523-4d17-92fd-53192a06207f" - `execution_results.execution_timestamp` (string, required) Date and time at which this portion of the payment was executed. Example: "2019-10-01T18:24:29.867Z" - `execution_results.execution_result_type` (string, required) Type of payment execution result. 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" - `execution_results.execution_result_order` (integer, required) Order in which the payment execution action was taken along the liquidity path. For example, a payment may include five execution results along the liquidity path. Each execution result has an order number that indicates the order in which the execution result was achieved to make the payment. Example: 1 - `execution_results.sending_fee` (number, required) Fees the sender is charging. Example: 2 - `execution_results.receiving_fee` (number, required) Fees the receiver is charging. - `execution_results.sending_currency_code` (string) Currency code of the sending amount. Included in execution results with execution_result_type set to EXCHANGE. Example: "USD" - `execution_results.receiving_currency_code` (string) Currency of the receiving amount. Included in execution results with execution_result_type set to EXCHANGE. Example: "GBP" - `execution_results.transfer_currency_code` (string) Currency of the transfer. Returned in execution results with execute_result_type set to TRANSFER. - `execution_results.intermediary_delta` (number) Amount of XRP representing the difference in FX rate between the moment of quoting and the moment of execution. A positive value is the amount taken out of the incentive pool. A negative value is the amount returned to the incentive pool. (Soon to be deprecated) Example: 0.2 - `execution_results.incentive_type` (string) Configuration of the incentive pool on the xRapid side. Two values are supported, firm and fx. For firm, xRapid guarantees that the FX rate at the moment of execution is the same as at the moment of quoting. For fx, xRapid guaratees a predefined FX rate. Example: "firm" - `execution_results.incentive_value` (number) Amount of XRP representing the difference in FX rate between the moment of quoting and the moment of execution. A positive value is the amount taken out of the incentive pool. A negative value is the amount returned to the incentive pool. Example: 0.2 - `execution_results.transaction_hash` (string) Hash representing the unique identifier for the transfer of funds in the XRP ledger. Example: 5.5467794184785867e+76 - `execution_results.venue_id` (string) The id from an exchange associated with a transaction involving an exchange account. Example: "nz7RpAujYgnQtjEM" - `execution_results.fiat_adjusted_value` (number) Represents the delta between quoted and received executed amounts, for exchange trades. Example: 0.02 - `execution_results.odl_payment_id` (string) Payment ID in On-Demand Liquidity (ODL) for an executed ODL payment containing the transaction represented by this execution result. - `liquidation_execution_results` (array) Represents the actual movement of funds in a payment as part of liquidation of a Wallet Receive payment. - `liquidation_details` (object) Payment liquidation details - `liquidation_details.id` (string) Liquidation ID, unique to the liquidation process of this payment - `liquidation_details.status` (string) Liquidation status - `liquidation_details.failure_reason` (string) Reason behind failure of the liquidation, only applicable if the status is failure - `liquidation_details.failure_count` (integer) Number of times the liquidation failed. Irrelevant if status is successful. - `push_forward_execution_results` (array) Represents the movement of funds after an On-Demand Liquidity payment fails at intermediary transfer or destination exchange. - `accepted_at` (string, required) Date and time at which the payment was last accepted, as an ISO-8601 timestamp in UTC. Example: "2019-10-01T18:25:47.347Z" - `executed_at` (string) Date and time at which the payment was last executed, as an ISO-8601 timestamp in UTC. Example: "2019-10-01T18:25:47.347Z" - `completed_at` (string) Date and time at which the payment was last completed, as an ISO-8601 timestamp in UTC. Example: "2019-10-01T18:25:47.347Z" - `internal_info` (object, required) JSON object containing information that only the RippleNet instance that set it can view. These values can be set by the sender when accepting a payment and by an intermediary or receiver when locking the payment. - `internal_info.connector_role` (string, required) Role of the RippleNet node that sets one or more values in the Internal Info object. Use as follows: * SENDING: Sending account in the payment resides on this RippleNet instance. * RECEIVING: Receiving account in the payment resides on this RippleNet instance. * INTERMEDIARY: Neither sending nor receiving accounts in the payment reside on this RippleNet instance. * INTERNAL: Both sending and receiving accounts in the payment (usually between RippleNet Cloud and RippleNet) reside on this RippleNet instance. Enum: "SENDING", "RECEIVING", "INTERMEDIARY", "INTERNAL" - `internal_info.labels` (array, required) Array of objects that provide label values that are set by including the sub_state field at any stage of the payment's lifecycle. Labels can be used as a filtering mechanism when searching for payments. Labels are visible only to the node that added them to this copy of a payment. If the values that populate this array are not set in the request or if the values set in the request are not viewable by your node, this array is empty. - `internal_info.labels.label` (string) Label to be attached - `internal_info.internal_id` (string, required) ID that is viewable only to the node that set it. This value can be set by the sender when accepting a payment. This value can also be set by any intermediary and the receiver when locking the payment. If this value is not set in the request or if the value set in the request is not viewable by your node, this field value is set to null. - `user_info` (array, required) User-provided data with arbitrary key/value pairs. - `user_info.node_address` (string, required) RippleNet address of the node that provided the user information. Example: "rn.us.ca.san_francisco" - `user_info.accepted` (array, required) User information optionally provided when accepting the payment. - `user_info.accepted.json` (object, required) User information provided across the payment lifecycle stored as arbitrary JSON key/value pairs. - `user_info.accepted.created_at` (string, required) Date and time at which the user information was added to the payment, as an ISO-8601 timestamp in UTC. - `user_info.accepted.subState` (string) If provided, this parameter descibes payment state more granularly. Example: "EXECUTING" - `user_info.locked` (array, required) User information optionally provided when locking the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.lock_declined` (array, required) User information optionally provided when declining to lock the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.retry_accept` (array, required) User information optionally provided when retrying acceptance of the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.retry_settlement` (array, required) User information optionally provided when retrying settlement of the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.settlement` (array, required) User information optionally provided when settling the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.settlement_declined` (array, required) User information optionally provided when settlement for the payment is declined. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.failed` (array, required) User information optionally provided when failing the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.executed` (array, required) Payment sub-state information provided using sub_state and memo fields when finalizing the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.completed` (array, required) User information optionally provided when completing the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.forwarded` (array, required) If applicable, user information optionally provided when forwarding the payment. For more information, see [User Info Entry Object][user-info-entry]. - `user_info.returned` (array, required) If applicable, information optionally provided using return_reasons when returning the payment. For more information, see [User Info Entry Object][user-info-entry]. ## Response 412 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"