v1

latestOpenAPI 3.0.02026-08-06102185472.3 KB
Non-orchestration payments

Create quote to reverse payment

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.

post/quote_collections/reversal

Request body

original_payment_idstring uuid required

ID of the original payment to be reversed.

Example request

{
  "original_payment_id": "d485f100-2af7-4e48-9ab1-3c7e28775691",
  "reversal_reason": {
    "code": "RB001",
    "description": "No account / Unable to locate account"
  }
}

Response

Successfully returned a collection of quotes to return a payment.

quote_collection_idstring uuid required

Unique identifier of the quote collection.

Example response

{
  "quote_collection_id": "4711728c-cd35-49ec-96a5-72732b4333ec",
  "quotes": [
    {
      "quote_id": "2a547e56-4aac-4375-86a8-8b3e7014801d",
      "created_at": "2020-01-29T20:59:44.925Z",
      "expires_at": "2020-01-29T21:29:44.925Z",
      "type": "SENDER_AMOUNT",
      "price_guarantee": "FIRM",
      "sender_address": "sf@rn.us.ca.san_francisco",
      "receiver_address": "sf_gbp@rn.us.ca.san_francisco",
      "amount": "1",
      "currency_code": "USD",
      "currency_code_filter": "EUR",
      "quote_elements": [
        {
          "quote_element_id": "259189e7-cb14-42e7-99ef-375f3285e356",
          "quote_element_type": "EXCHANGE",
          "quote_element_order": "1",
          "sender_address": "sf@rn.us.ca.san_francisco",
          "receiver_address": "sf_gbp@rn.us.ca.san_francisco",
          "sending_amount": 1,
          "receiving_amount": 355,
          "sending_currency_code": "USD",
          "receiving_currency_code": "GBP",
          "fx_rate": {
            "rate": 3.25,
            "base_currency_code": "USD",
            "counter_currency_code": "GBP",
            "type": "buy"
          }
        }
      ],
      "payment_method": "LOCAL_RAILS",
      "payment_method_fields": "{\"category_id\":\"bank\",\"required_originator_fields\":[{\"field_name\":\"sender_address\",\"field_label\":\"Sender address\"}]}",
      "payout_method_info": {
        "payout_method_name": "Cash Payout",
        "payout_method_category": "BOOK_TRANSFER",
        "description": "local rails",
        "estimated_time_to_credit": "3 days"
      }
    }
  ],
  "quote_errors": [
    {
      "failed_path": [
        {
          "account_liquidity_relationship_id": "480e3a6f-3bcd-48cd-9ce9-9d940aa3c9c6",
          "peer_liquidity_relationship_id": "480e3a6f-3bcd-48cd-9ce9-9d940aa3c9c6"
        }
      ]
    }
  ]
}