v1

latestOpenAPI 3.0.02026-08-06102185472.3 KB
Non-orchestration payments

Get payments

Retrieves all payments in an instance of xCurrent that meet the criteria defined by the query parameters. You can use the query parameters to filter payments. The default parameters are sort_field : MODIFIED_AT , sort_direction : DESC , page : 0 , size : 10

get/payments

Query parameters

pageinteger

The page number for paginated results. The value is zero-based, where 0 represents the first page.<br/> Set it to 0 to get the first page of results.

sizeinteger

Number of payments to return per page.

sending_hoststring

Optional parameter for filtering with sendingHost value.

receiving_hoststring

Optional parameter for filtering with receivingHost value.

sending_accountstring

Optional parameter for filtering with sendingAccount value.

receiving_accountstring

Optional parameter for filtering with receivingAccount value.

sending_currencystring

Optional parameter for filtering with sendingCurrency value.

receiving_currencystring

Optional parameter for filtering with receivingCurrency value.

payment_idstring uuid

Optional parameter for filtering with paymentId value. This parameter is deprecated. Please use payment_ids instead

payment_typestring

Filters for payments based on the type of payment. Valid types are REGULAR, RETURN.

internal_idstring

Optional parameter for filtering with internalId.

sender_end_to_end_idstring

Optional parameter for filtering with senderEndToEndId.

connector_rolestring

Filters for payments based on the role of the responding connector. Valid roles are SENDING, INTERMEDIARY, RECEIVING, and INTERNAL. The INTERNAL role is meant for payments between RippleNet Cloud and RippleNet where the sender and receiver accounts are on the same RippleNet instance. Use role with state to find payments waiting on action from you as the sending or receiving (or internal) connector.

statestring

Deprecated, should use states parameter. Returns payments in the specified state. The following options are valid: ACCEPTED, COMPLETED, EXECUTED, FAILED, LOCKED, LOCK_DECLINED, PREPARED, RETURNED, and SETTLEMENT_DECLINED

statesstring[]

Returns payments in the specified states. The following options are valid: ACCEPTED, COMPLETED, EXECUTED, FAILED, LOCKED, LOCK_DECLINED, PREPARED, RETURNED, and SETTLEMENT_DECLINED

beforestring

Filters for payments where the payments range_field column value is before this specified time stamp (not inclusive). You can also specify after to create a time range between after and before. If before is specified, range_field must also be specified.

afterstring

Filters for payments where the payments range_field column value is after this specified time stamp (not inclusive). You can also specify before to create a time range between after and before. If after is specified, range_field must also be specified.

range_fieldstring

Designates the column name of the payments database table that is used for filtering payments before/after/between time stamps. The following options are valid: CREATED_AT, MODIFIED_AT, ACCEPTED_AT, LOCKED_AT, EXECUTED_AT, COMPLETED_AT, RETURNED_AT and EXPIRES_AT. For example, if you specify range_field=MODIFIED_AT, you would specify a time stamp (in the 24 character ISO 8601 YYYY-MM-DDTHH:mm:ss.sssZ format used in payment objects) as the value for before and/or after to fetch payments before, after, or between the specified time range(s) (not inclusive). If range_field is specified, before and/or after must also be specified.

amount_range_field'SENDING_AMOUNT' | 'RECEIVING_AMOUNT'

Designates the column name of the payments database table that is used for filtering payments greater/less/between amounts. For example, if you specify amount_range_field=SENDING_AMOUNT, you would specify an amount as the value for greater and/or less to fetch payments greater, less, or between the specified amounts (inclusive). If amount_range_field is specified, minAmount and/or maxAmount must also be specified.

min_amountnumber

Optional parameter for filtering with min sending/receiving amount.

max_amountnumber

Optional parameter for filtering with max sending/receiving amount.

with_labelsstring[]

Returns payments with the specified labels. <p>If you apply with_labels with <i>multiple</i> labels, the response returns payments with at least one of the specified labels.</p> <p>For example, the query, </p> <p><b>?with_labels=string1,string2</b></p> <p>returns payments with either "string1" OR "string2".</p>

without_labelsstring[]

Returns payments that do <i>not</i> have any of the specified labels. <p>If you apply without_labels with <i>multiple</i> labels, the response returns payments that do not have any of the specified labels.</p> <p>For example, the query,</p> <p><b>?without_labels=string3,string4</b></p> <p>returns payments that are not labeled with either "string3" OR "string4".</p> <p>If you apply both with_labels <i>and</i> without_labels parameters, the response returns payments that have at least one of the specified with_labels strings but omits payments that also have any of the the without_labels strings. </p> <p>For example, the query, </p> <p><b>?with_labels=string1&without_labels=string3</b></p> <p>returns payments with "string1" but not payments with "string3".</p>

sort_fieldstring

Sorts results according to the specified field. Valid options are PAYMENT_ID, EXPIRES_AT, MODIFIED_AT and CREATED_AT.

sort_directionstring

Sorts result according to the specified direction. Valid options are ASC, DESC.

load_additional_detailsboolean

This parameter can be used to exclude additional info being returned for each payment object. Additional info which will be excluded if the flag set to false include user_info, ripplenet_info, execution_results and internal_info.labels

payment_idsstring[]

List of paymentIds to search for

Response

Successful response

firstboolean

true if this is the first page.

lastboolean

true if this is the last page.

numberinteger

page number

numberOfElementsinteger

Number Of elements in this request

sizeinteger

page size

totalElementsinteger

Total number of elements for the given request

totalPagesinteger

Total number of pages for the given request

Example response

{
  "sort": [
    {
      "direction": "ASC",
      "nullHandling": "NULLS_FIRST",
      "ascending": true
    }
  ],
  "content": [
    {
      "payment_id": "d485f100-2af7-4e48-9ab1-3c7e28775691",
      "contract_hash": "ccb23bd87f13cc13b9d616a9723f76e112aeac8628b2082e0f8bf3b8c670b103",
      "payment_state": "COMPLETED",
      "modified_at": "2019-10-01T18:25:47.347Z",
      "contract": {
        "created_at": "2019-10-01T18:18:13.665Z",
        "expires_at": "2019-10-01T18:55:22.824Z",
        "quote": {
          "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"
          }
        }
      },
      "ripplenet_info": [
        {
          "node_address": "rn.us.ny.new_york",
          "settlement_declined": [
            {
              "info": "L001",
              "created_at": "2018-04-06T20:33:35Z"
            }
          ]
        }
      ],
      "execution_condition": "PrefixSha256Condition{subtypes=[ED25519-SHA-256], type=PREFIX-SHA-256, fingerprint=sfGGHCrkyaMsLQNB62w_4zarlPChHKm47JkXVQbs1z0, cost=132360}",
      "crypto_transaction_id": "4e05da26-7872-4a1f-b9b7-db7604757c37",
      "validator": "rn.us.ca.san_francisco",
      "payment_type": "REGULAR",
      "execution_results": [
        {
          "execution_result_id": "06f6d4e2-3523-4d17-92fd-53192a06207f",
          "execution_timestamp": "2019-10-01T18:24:29.867Z",
          "execution_result_type": "TRANSFER",
          "execution_result_order": 1,
          "sender_address": "trans_usd_sf@rn.us.ca.san_francisco",
          "receiver_address": "conct_usd_sf@rn.us.ca.san_francisco",
          "sending_amount": 498,
          "receiving_amount": 498,
          "sending_fee": 2,
          "sending_currency_code": "USD",
          "receiving_currency_code": "GBP",
          "fx_rate": {
            "rate": 3.25,
            "base_currency_code": "USD",
            "counter_currency_code": "GBP",
            "type": "buy"
          },
          "intermediary_delta": 0.2,
          "incentive_type": "firm",
          "incentive_value": 0.2,
          "venue_id": "nz7RpAujYgnQtjEM",
          "fiat_adjusted_value": 0.02
        }
      ],
      "liquidation_execution_results": [
        {
          "execution_result_id": "06f6d4e2-3523-4d17-92fd-53192a06207f",
          "execution_timestamp": "2019-10-01T18:24:29.867Z",
          "execution_result_type": "TRANSFER",
          "execution_result_order": 1,
          "sender_address": "trans_usd_sf@rn.us.ca.san_francisco",
          "receiver_address": "conct_usd_sf@rn.us.ca.san_francisco",
          "sending_amount": 498,
          "receiving_amount": 498,
          "sending_fee": 2,
          "sending_currency_code": "USD",
          "receiving_currency_code": "GBP",
          "fx_rate": {
            "rate": 3.25,
            "base_currency_code": "USD",
            "counter_currency_code": "GBP",
            "type": "buy"
          },
          "intermediary_delta": 0.2,
          "incentive_type": "firm",
          "incentive_value": 0.2,
          "venue_id": "nz7RpAujYgnQtjEM",
          "fiat_adjusted_value": 0.02
        }
      ],
      "push_forward_execution_results": [
        {
          "execution_result_id": "06f6d4e2-3523-4d17-92fd-53192a06207f",
          "execution_timestamp": "2019-10-01T18:24:29.867Z",
          "execution_result_type": "TRANSFER",
          "execution_result_order": 1,
          "sender_address": "trans_usd_sf@rn.us.ca.san_francisco",
          "receiver_address": "conct_usd_sf@rn.us.ca.san_francisco",
          "sending_amount": 498,
          "receiving_amount": 498,
          "sending_fee": 2,
          "sending_currency_code": "USD",
          "receiving_currency_code": "GBP",
          "fx_rate": {
            "rate": 3.25,
            "base_currency_code": "USD",
            "counter_currency_code": "GBP",
            "type": "buy"
          },
          "intermediary_delta": 0.2,
          "incentive_type": "firm",
          "incentive_value": 0.2,
          "venue_id": "nz7RpAujYgnQtjEM",
          "fiat_adjusted_value": 0.02
        }
      ],
      "accepted_at": "2019-10-01T18:25:47.347Z",
      "locked_at": "2019-10-01T18:25:47.347Z",
      "executed_at": "2019-10-01T18:25:47.347Z",
      "completed_at": "2019-10-01T18:25:47.347Z",
      "returned_at": "2019-10-01T18:25:47.347Z",
      "internal_info": {
        "connector_role": "RECEIVING"
      },
      "user_info": [
        {
          "node_address": "rn.us.ca.san_francisco",
          "accepted": [
            {
              "subState": "EXECUTING"
            }
          ],
          "locked": [
            {
              "subState": "EXECUTING"
            }
          ],
          "lock_declined": [
            {
              "subState": "EXECUTING"
            }
          ],
          "retry_accept": [
            {
              "subState": "EXECUTING"
            }
          ],
          "retry_settlement": [
            {
              "subState": "EXECUTING"
            }
          ],
          "settlement": [
            {
              "subState": "EXECUTING"
            }
          ],
          "settlement_declined": [
            {
              "subState": "EXECUTING"
            }
          ],
          "failed": [
            {
              "subState": "EXECUTING"
            }
          ],
          "executed": [
            {
              "subState": "EXECUTING"
            }
          ],
          "completed": [
            {
              "subState": "EXECUTING"
            }
          ],
          "forwarded": [
            {
              "subState": "EXECUTING"
            }
          ],
          "returned": [
            {
              "subState": "EXECUTING"
            }
          ]
        }
      ]
    }
  ]
}