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.
| Operation | Method | Description |
|---|---|---|
| Create quote collection | POST | Create a collection of quotes, one for each available payment rail. |
| Get quote collection | GET | Get a quote collection by ID. |
| Get a quote | GET | Get a specific quote by ID. |
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:
payoutCategoryanddestinationBlockchainNetworkaren't part of the request. For a stablecoin payout, the blockchain network is the payment rail, and you omitdestinationCountry.paymentRailis an optional request field.- The
payinCategoryvaluesFUNDEDandT_PLUS_ONEare not accepted. UsePRE_FUNDINGin place ofFUNDED, andCREDIT_FUNDINGin place ofT_PLUS_ONE.
Create quote collection request
The amount for which you wish to receive a collection of quotes.
The type of amount for which you want to get a quote.
| Enum Value | Description |
|---|---|
| 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. |
The currency code of the currency that you are sending.
The currency code of the currency in which your beneficiary will receive this payment.
The country code of the country from where you are sending the funds. This is an ISO 3166-1 alpha-2 code.
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.
The name of the pay in category indicating how this payment will be funded.
| Enum Value | Description |
|---|---|
| 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. |
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.
- Mock serverhttps://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v3/quotes/quote-collection
- UAT environment with simulated currencyhttps://api.test.ripple.com/v3/quotes/quote-collection
- Production environmenthttps://api.ripple.com/v3/quotes/quote-collection
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"
}'{ "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222", "quotes": [ { … } ] }