v1

latestOpenAPI 3.0.02026-08-06102185472.3 KB
Request for payment

Send request for payment

Sends a new request for payment.

post/request_for_payment

Request body

sender_addressstring required

RippleNet address of the node that is receiving the request for payment, or the eventual sender of the payment.

receiver_addressstring required

RippleNet address of the node that is sending the request for payment, or the eventual receiver of the payment.

amountnumber required

Amount requested to be paid.

currencystring required

Currency code for the amount value.

quote_type'SENDER_AMOUNT' | 'RECEIVER_AMOUNT' | 'SENDER_INSTITUTION_AMOUNT' | 'RECEIVER_INSTITUTION_AMOUNT' required

Indicates how the amount field should be treated for calculating quote values.

end_to_end_idstring

ID that the eventual payment receiver can specify. Persisted on all rippleNet node instances (namely, the sender and receiver of the payment) that participate in the request for payment.

user_infoobject

User-provided data with arbitrary key/value pairs.

Example request

{
  "sender_address": "trans_usd_sf@rn.us.ca.san_francisco",
  "receiver_address": "trans_gbp_lon@rn.eur.uk.london",
  "amount": 100.01,
  "currency": "USD",
  "quote_type": "SENDER_AMOUNT"
}

Response

Successfully sent a request for payment resulting in a request for payment object in the REQUESTED state.

request_for_payment_idstring uuid required

Unique identifier of a request for payment.

request_for_payment_state'REQUESTED' | 'ACCEPTED' | 'FAILED' required

State of the request for payment.

sender_addressstring required

RippleNet address of the node that is receiving the request for payment, or the eventual sender of the payment.

receiver_addressstring required

RippleNet address of the node that is sending the request for payment, or the eventual receiver of the payment.

amountnumber required

Amount requested to be paid.

currencystring required

Currency code for the amount value.

quote_type'SENDER_AMOUNT' | 'RECEIVER_AMOUNT' | 'SENDER_INSTITUTION_AMOUNT' | 'RECEIVER_INSTITUTION_AMOUNT' required

Indicates how the amount field should be treated for calculating quote values.

end_to_end_idstring

ID that the eventual payment receiver can specify. Persisted on all rippleNet Node instances (namely, the sender and receiver of the payment) that participate in the request for payment.

created_atstring date-time required

Date and time at which the request for payment was created, as an ISO-8601 timestamp in UTC.

payment_idstring uuid

Unique identifier of a payment associated to request for payment.

Example response

{
  "request_for_payment_id": "1bf93760-ef69-4697-b2b4-47d9e1c42aa7",
  "request_for_payment_state": "REQUESTED",
  "sender_address": "trans_usd_sf@rn.us.ca.san_francisco",
  "receiver_address": "trans_gbp_lon@rn.eur.uk.london",
  "amount": 100.01,
  "currency": "USD",
  "quote_type": "SENDER_AMOUNT",
  "user_info": [
    {
      "requested": [
        {
          "subState": "EXECUTING"
        }
      ],
      "accepted": [
        {
          "subState": "EXECUTING"
        }
      ],
      "failed": [
        {
          "subState": "EXECUTING"
        }
      ]
    }
  ],
  "payment_id": "5492648d-2132-4e70-9ded-2fc86f22b321"
}