Ripple USD 백서

Ripple USD

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 9쪽 중 9쪽

yment back to the PREPARED state and generates a new crypto-transaction. EXECUTED The receiver has signed the execution_condition creating a "payload" and sent an "execute payment transfer" message, which travels to all participants in the payment. When the payment is fully executed, funds have been transferred from the hold account to the receiver account on all RippleNet ledgers. Only the receiver can fail payments in the EXECUTED state. The general use case for failing an executed payment is to return the payment to the originating institution in fiat only transactions. SETTLEMENT_DECLINED The receiver has not been able to fulfill the payment due to insufficient liquidity. Once the problem is addressed, and if the payment has not expired, senders can resubmit the Settle Payment request. If this request is successful, RippleNet moves the payment back to the PREPARED state and generates a new crypto-transaction. Payments that expire before being settled move automatically to the FAILED state. FAILED The payment has been actively stopped by a participating institution, or the payment has failed automatically because the payment has expired. An institution can only fail a payment in turn. Failed payments can be returned in fiat flows. COMPLETED After verifying that the funds have reached the end beneficiary, the payment state gets updated to COMPLETED . Depending on your use case, this verification happens either outside the RippleNet payment flow by the receiver or within; hence, the COMPLETED state may be triggered outside of RippleNet but can still be returned in fiat flows. RETURNED For fiat payments only A final state. The receiver has sent a Return payment request, generating a new payment object, in reference to the original payment from the sender. Return Payment initiates a quote collection response and follows normal payment flow but in reverse order. When this new payment is successfully moved to the COMPLETED state and the money is returned, the original payment automatically moves to the RETURNED state from either the EXECUTED , COMPLETED or FAILED state. Request for payment states The state field of the RequestForPayment object defines the end-to-end payment request status. Each subsequent state overrides previous states. State Description REQUESTED The first state of the RequestForPayment object. The payment beneficiary institution has made a successful Send request for payment request. In this state, the payment sender institution knows to initiate a payment to the beneficiary. ACCEPTED The final state of a successful request for payment. The payment sender has sent an Accept request for payment request and populated the RequestForPayment object with the payment_id of the settled payment. FAILED The request for payment had been actively terminated with a Fail request for payment request. Payment state transitions Once all parties agree upon a payment contract and the payment state is LOCKED , RippleNet uses a two-phase commit to execute the payment. On all RippleNet ledgers in the payment chain (sender, intermediaries, receiver): Funds transfer to a hold account and the payment state moves from LOCKED to PREPARED . Funds transfer to a transactional account and the payment state moves from PREPARED to EXECUTED . Once a payment is PREPARED it moves into a logical area called the crypto-transaction boundary . Within the boundary, payment state changes are determined by the state of the crypto-transaction, which can be PENDING , EXECUTED , EXPIRED or CANCELLED . Outside of the boundary, the payment succeeds or fails based on the payment expiration time. Most payments are executed as expected and payment state transitions are near simultaneous on all RippleNet instances. There may be times, however, when each RippleNet instance temporarily reflects a different payment state. Whether the payment is successful or not, background processes ensure that the payment state is eventually consistent across all RippleNet instances. Scenarios Both scenarios below assume: The payment chain is Sender > Receiver . The payment is LOCKED on all nodes in the payment chain. The validator on the sender's RippleNet host is used for the payment. Happy path The happy path assumes that all RippleNet ledgers have enough liquidity to execute the payment. Sender sends a Settle payment request: The validator creates a crypto-transaction using the execution condition created with Accept quote . Funds on the sender RippleNet ledger transfer to a hold account. Payment state on the sender RippleNet instance moves to PREPARED . Payment states across payment chain: Sender Receiver PREPARED LOCKED The sender sends a message to the receiver that the payment is PREPARED : Funds on the receiver RippleNet ledger transfer to a hold account. Payment state on the receiver RippleNet instance moves to PREPARED (and all parties have consistent states). Receiver sends a 200 OK response up the payment chain (and spawns a background process to send the fulfillment). Payment states across payment chain: Sender Receiver PREPARED PREPARED The receiver creates the payment fulfillment (using its private key) and sends it to the validator . Validator cryptographically verifies the fulfillment. Validator executes the crypto-transaction and the crypto-transaction state moves to EXECUTED . The validator sends the EXECUTED crypto-transaction to the receiver: Funds on the receiver RippleNet ledger transfer from the hold account to the transactional account. Payment state on the receiver RippleNet instance moves to EXECUTED . Payment states across payment chain: Sender Receiver PREPARED EXECUTED The sender sends a message up the payment chain that the payment has been executed: Funds on the sender RippleNet ledger transfer from the hold account to the transactional account. Payment state on the sender RippleNet instance moves to EXECUTED . Payment states across payment chain: Sender Receiver EXECUTED EXECUTED Note If a payment is in the PREPARED state and within the crypto-transaction boundary, a background process continually queries the validator for the state of the crypto-transaction. If the crypto-transaction is EXECUTED , but the happy path message does not reach the other RippleNet nodes so that they seem "stuck" in the PREPARED state, the background process takes over and triggers payment execution. Unhappy path In this path, the receiving RippleNet ledger does not have enough liquidity to execute the payment and the crypto-transaction is cancelled. Sender sends a Settle payment request: The validator creates a crypto-transaction (using the execution condition created with Accept quote ). Funds on the sender RippleNet ledger transfer to a hold account. Payment state on the sender RippleNet instance moves to PREPARED . Payment states across payment chain: Sender Receiver PREPARED LOCKED Sender sends a message to the receiver that the payment is PREPARED : Funds on the receiver RippleNet ledger are not available and no funds move . The validator does not receive fulfillment from the receiver and the crypto-transaction state moves to CANCELLED . Payment state on the sender and receiver instances moves to SETTLEMENT_DECLINED . Funds on the sender RippleNet ledger rollback from the hold account. Payment states across payment chain: Sender Receiver SETTLEMENT_DECLINED SETTLEMENT_DECLINED Receiving institution repairs liquidity issue out-of-band. Payment expiration If the payment expires while waiting in the SETTLEMENT_DECLINED state, it transitions to the FAILED state on all RippleNet instances. Sender resubmits a Settle payment request against the same payment ID. The validator creates a new crypto-transaction. Funds on the sender RippleNet ledger transfer to a hold account. Payment state on the sender RippleNet instance moves to PREPARED and the happy path takes over. ## /products/payments-odl/api-docs/ripplenet/best-practices/payment-substates Payment sub-states View as Markdown View as Markdown Open this page as Markdown Copy for LLM Copy page as Markdown for LLMs Open in Claude Get insights from Claude Open in ChatGPT Get insights from ChatGPT Payment sub-states are a type of payment label that is applied to the Standard RippleNet Payment Object (SRPO) . Sub-states support bi-directional communication between RippleNet Server instances after payments have been settled, but not yet completed. Where labels only provide messaging capabilities, sub-states provide functionality for continuing the payment process until completion. Within the context of the overall payment process, senders use the Settle payment operation to settle or execute payments in the LOCKED state, and the payment state for settled payments is EXECUTED , which indicates that funds have been transferred to the receiver account on all RippleNet ledgers. Once a payment enters the EXECUTED state, receivers use sub-states to process and communicate the status of payments for the following scenarios: Cash payouts Required amended information for beneficiary payout on local rails Originator cancels a payment Pending due diligence For more information about payment states in RippleNet, see Payment states . Payment labels vs. sub-states Keep in mind that there are key differences between payment labels and sub-states: Labels Only visible to the party that uses them Only added to the internal_info block of the RPO Deletion only removes labels from the internal_info block Sub-states Used for bi-directional messaging and payment processing between participants Added to both the internal_info block and user_info.executed block of the RPO Deletion removes sub-states from the internal_info block but not the user_info.executed block API operations for payment sub-states The following RippleNet Server API operations provide sub-state functionality: Finalize payment Add payment sub-state Get payments Delete payment labels Finalize payment The Finalize payment operation is used exclusively by receivers to mark payments in the EXECUTED state with two specific sub-states: FORWARDED and AWAITING_COLLECTION . The receiver can make this request multiple times to provide a log of each subsequent sub-state until it is ready to make the Complete payment request. The sub-state label is added to both the internal_info.labels and user_info.executed arrays of the RPO. Add payment sub-state The Add payment sub-state operation is used by both senders and receivers to mark payments in the EXECUTED state with any of the RippleNet payment sub-states, excluding FORWARDED and AWAITING_COLLECTION , provided in the list below. The sub-state label is added to both the internal_info.labels and user_info.executed arrays of the RPO. Get payments The Get payments operation is used by both senders and receivers to retrieve all payments in a RippleNet server instance that meet the criteria defined by the query parameters. For managing payment sub-states, senders and receivers use the Get payments operation to poll for payments in the EXECUTED state with specific sub-state labels. Delete payment labels The Delete payment labels operation is used to remove an existing label from the internal_info.labels array in the RPO without removing or altering the sub-state label in the user_info.executed block. Labels should be removed after an action has been taken, ensuring that the payment does not continue to show up in poller results for past sub-states. List of payment sub-states To standardize implementations, the following sub-states are defined based on the currently known use cases. This list will be updated as and when more use cases arise that can use this feature. Sub-state Description AMENDED The sender has amended the user_info array. The amended user_info array within this sub-state block will have precedence over the original user_info array. AWAITING_AGENT_PROCESS For cash pick up when the receiving agent generates a unique code for the payment. AWAITING_COLLECTION The funds are available for the beneficiary to collect. AMENDMENT_PROCESSING Indicates that the amended information was sent to the agent. AMENDMENT_REJECTED Indicates that the amended information was rejected. COLLECTION_FAILED The cash payout collection failed. FORWARDED The payment has been forwarded to local rails for final payout to the beneficiary. PAYOUT_FAILED The payout failed, that is the beneficiary hasn't been paid out. PENDING_BANK_DUE_DILIGENCE The receiver has forwarded payment to a bank but the bank has informed them that settlement will be delayed due to additional compliance activity required by the bank. For example, this sometimes happens with large payments. PENDING_DUE_DILIGENCE Additional processes or checks are required to be performed by the receiver prior to payout. PENDING_PAYOUT The payout to the beneficiary is currently pending. REQUEST_INFO The receiver has requested additional or amended information to perform final payout to the beneficiary. REQUEST_RETURN The originator has requested that an executed payment be returned. REQUEST_RETURN_REJECTED The receiver has rejected a request to return an executed payment. Note If the sub-states listed above are not sufficient to handle a specific use case, please reach out to your Ripple customer partner engineer. Recommendations for sub-state field values The following table lists all of the available RippleNet payment sub-states, recommended memo and info field values, and indicates which participant adds the sub-states and which participants polls for the sub-state. Sub-state Memo Info (Optional) Added By Polled By FORWARDED “Instruction is being processed by the clearing channel, awaiting final status.” Receiver Sender PENDING_DUE_DILIGENCE “Payment has been sent to compliance for manual checks.” Receiver Sender AWAITING_COLLECTION “Payment available for the beneficiary to collect.” Reference or PIN code for the beneficiary to collect cash. Receiver Sender COLLECTION_FAILED “Cash pick-up collection failed.” Receiver Sender REQUEST_RETURN “Request for this executed payment to be returned.” Sender Receiver REQUEST_RETURN_REJECTED “The request for returning this executed payment has been rejected.” Receiver Sender REQUEST_INFO “Additional information required.” Errors, array of errors related to the missing field, wrong field, or a document. See Error codes for more information and examples. Receiver Sender AMENDED “ user_info has been amended. The amended user_info within this sub-state block will take precedence over the original user_info .” Include the amended user_info . Sender Receiver AWAITING_AGENT_PROCESS “The agent is processing instructions, awaiting final status.” Receiver Sender AMENDMENT_REJECTED “The amended information led to a payment failure.” Receiver Sender AMENDMENT_PROCESSING “The amended information was sent to the agent, awaiting final status.” Receiver Sender Caution The FORWARDED and AWAITING_COLLECTION sub-states should be only triggered by the receiver through the Finalize payment operation. The rest of the sub-states in the list can be triggered by any node through the Add Payment Sub-state operation. Note In scenarios where payment failed due to insufficient liquidity, the payment will transition to the SETTLEMENT_DECLINED state. This is a payment state, not a sub-state. SETTLEMENT_DECLINED is a transient state that will eventually transition to the FAILED payment state when payment expires, if the retry process does not succeed.
프로젝트로 돌아가기