Creates a collection of quotes that can be used to return a payment.
The receiver can make this request while the payment is in states EXECUTED, COMPLETED, or FAILED. When the returned payment is successfully moved to the COMPLETED state, the original payment is moved to the RETURNED state.
Note: Currently, when making a Return Payment to a RippleNet Cloud account on a RippleNet ledger, the RippleNet user must lock and complete the payment. This means that the RippleNet user takes all action on the return: Get and Accept Quote, Lock, Settle, and Complete payment.
ID of the original payment to be returned.
Object with key and value pairs that describe the reason the payment is being returned.
The fields should contain the following key values: reason, code, and type.
These values are included in a payment created from a quote in the response. They are included in the user_info.returned array for the node sending the return payment.
{ "REASON": "Wrong receiving amount", "TYPE": "Account Error", "CODE": "A-999" }
Amount type of the return payment.
To indicate that the sender of the return payment will send the amount it received, set to TOTAL_RECEIVED.
To indicate that the sender of the return payment will send the amount it received minus its receiving fees, set to TOTAL_RECEIVED_MINUS_FEES.
Custom fee charged and collected by the sending account. Setting this field overrides all applicable fees configured on the sender's RippleNet instance.
Custom rate that the return payment quotes must use. The request returns only quotes that are able to provide this custom rate.
When true, this flag tells RippleNet to ignore cached value for path finding and liquidity path finding and perform new path finding and liquidity path finding.
- Mock serverhttps://docs.ripple.com/_mock/pt-br/products/payments-odl/api-docs/ripplenet/ripplenet/quote_collections/return
- https://[domainPrefix].ripplexcurrent.com/v4https://[domainPrefix].ripplexcurrent.com/v4/quote_collections/return
curl -i -X POST \
https://docs.ripple.com/_mock/pt-br/products/payments-odl/api-docs/ripplenet/ripplenet/quote_collections/return \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"original_payment_id": "d485f100-2af7-4e48-9ab1-3c7e28775691",
"return_reasons": {
"REASON": "Wrong receiving amount",
"TYPE": "Account Error",
"CODE": "A-999"
},
"return_amount_type": "TOTAL_RECEIVED_MINUS_FEES",
"custom_fee": 0,
"custom_rate": {
"rate": 0,
"base_currency": "string",
"counter_currency": "string",
"rate_type": "buy"
},
"force_path_finding_and_liquidity_path_finding": false,
"receiver_address": "sf@rn.us.ca.san_francisco"
}'Successfully returned a collection of quotes to return a payment.
Unique identifier of the quote collection.
For more information on quote elements, see Create quote collections.
{ "quote_collection_id": "4711728c-cd35-49ec-96a5-72732b4333ec", "quotes": [ { … } ], "quote_errors": [ { … } ] }