Skip to content

Create quote to reverse payment

Request

Creates a quote collection containing at most one quote that can be used to reverse 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 Reversal 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 reverse: Get and Accept Quote, Lock, Settle, and Complete payment.

Security
Bearer
Bodyapplication/jsonrequired
original_payment_idstring, (uuid)required

ID of the original payment to be reversed.

Example:"d485f100-2af7-4e48-9ab1-3c7e28775691"
reversal_reasonobjectrequired

Object with reversal code and description.

curl -i -X POST \
  https://docs.ripple.com/_mock/products/payments-odl/api-docs/ripplenet/reference/openapi/quote_collections/reversal \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "original_payment_id": "d485f100-2af7-4e48-9ab1-3c7e28775691",
    "reversal_reason": {
      "code": "RB001",
      "description": "No account / Unable to locate account"
    }
  }'

Responses

Successfully returned a collection of quotes to return a payment.

Bodyapplication/json
quote_collection_idstring, (uuid)required

Unique identifier of the quote collection.

Example:"4711728c-cd35-49ec-96a5-72732b4333ec"
quotesArray of objectsrequired

For more information on quote elements, see Create quote collections.

quote_errorsArray of objects
Response
{ "quote_collection_id": "4711728c-cd35-49ec-96a5-72732b4333ec", "quotes": [ { … } ], "quote_errors": [ { … } ] }