Skip to content

Use these API operations to create and retrieve quotes. A quote collection contains one quote for each payment rail available for the corridor, and each quote names its payment rail, so you can compare the quotes and choose one.

OperationMethodDescription
Create quote collectionPOSTCreate a collection of quotes, one for each available payment rail.
Get quote collectionGETGet a quote collection by ID.
Get a quoteGETGet a specific quote by ID.

Create quote collection

Request

Creates a collection of quotes for a proposed payment, one for each payment rail available for the corridor. A payment rail Ripple can't price is left out. Each quote has its own quoteId, paymentRail, exchange rate, and fees, and all quotes in the collection have the same expiry time. To create the payment, use the quoteId of the quote you choose.

To request a quote for one payment rail only, include paymentRail. For valid values, see Payment rail reference.

Request notes:

  • payoutCategory and destinationBlockchainNetwork aren't part of the request. For a stablecoin payout, the blockchain network is the payment rail, and you omit destinationCountry.
  • paymentRail is an optional request field.
  • The payinCategory values FUNDED and T_PLUS_ONE are not accepted. Use PRE_FUNDING in place of FUNDED, and CREDIT_FUNDING in place of T_PLUS_ONE.
Security
Bearer
Bodyapplication/jsonrequired

Create quote collection request

quoteAmountnumber, (double), >= 1required

The amount for which you wish to receive a collection of quotes.

Example:123.45
quoteAmountTypestringrequired

The type of amount for which you want to get a quote.

Default:"SOURCE_AMOUNT"
Enum ValueDescription
SOURCE_AMOUNT

Specify this value to get a quote for the amount that you want to send.

DESTINATION_AMOUNT

Specify this value to get a quote for the amount that the beneficiary should receive.

sourceCurrencystring^[a-zA-Z]{3,5}$required

The currency code of the currency that you are sending.

Example:"USD"
destinationCurrencystring^[a-zA-Z]{3,5}$required

The currency code of the currency in which your beneficiary will receive this payment.

Example:"MXN"
sourceCountrystring^[a-zA-Z]{2}$

The country code of the country from where you are sending the funds. This is an ISO 3166-1 alpha-2 code.

Example:"US"
destinationCountrystring^[a-zA-Z]{2}$

The country where the beneficiary is located specified in Alpha-2 Code format as defined in the ISO CountryCode ISO 3166-1 list. If the beneficiary is an individual, then this value is their country of residence. If the beneficiary is an institution, then this value is their country of incorporation.

Required for a fiat payout; omitting it returns USR_017. Omit it for a stablecoin payout, or the request fails.

Example:"MX"
payinCategorystring, [ 1 .. 128 ] charactersrequired

The name of the pay in category indicating how this payment will be funded.

Enum ValueDescription
PRE_FUNDING

Indicates that the payment is being made from funds you've deposited with Ripple.

CREDIT_FUNDING

Indicates the payment is being made and you will pay the outstanding invoice.

JIT_FUNDING

Indicates that the payment is being made and you will pay the outstanding amount before the payment expires.

Example:"PRE_FUNDING"
paymentRailstring, [ 1 .. 50 ] characters

The payment rail to quote. Include it to request a quote for this payment rail only. If you omit it, the collection contains a quote for each payment rail available for the corridor. For valid values, see Payment rail reference.

Example:"SPEI"
curl -i -X POST \
  https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v3/quotes/quote-collection \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "quoteAmount": 123.45,
    "quoteAmountType": "SOURCE_AMOUNT",
    "sourceCurrency": "USD",
    "destinationCurrency": "MXN",
    "sourceCountry": "US",
    "destinationCountry": "MX",
    "payinCategory": "PRE_FUNDING",
    "paymentRail": "SPEI"
  }'

Responses

Creates a collection of quotes

Bodyapplication/json
quoteCollectionIdstring, (uuid), [ 1 .. 36 ] charactersrequired

Unique ID that represents this quote collection.

Example:"11111111-aaaa-2222-bbbb-222222222222"
quotesArray of objects, >= 0 itemsrequired

List of quotes

Response
{ "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222", "quotes": [ { … } ] }