Create quote collection request
Payments Direct API (0.0.3)
Use the Payments Direct API to get quotes, create and manage payments, and manage originator and beneficiary identities.
The Payments Direct API offers the following environments:
Environment | Base URL | Description |
|---|---|---|
| Test | https://api.test.ripple.com | Test environment with simulated currency. |
| Production | https://api.ripple.com | Production environment |
All Ripple Payments Direct API operations require a Bearer access token specific to the environment you're using. Ripple provides a secure model for authentication and authorization by providing access tokens scoped for a set of credentials.
You will need your client ID and client secret to obtain an access token.
If you do not already have your client ID and client secret, do the following:
- Log into the Ripple Payments UI.
- In the left navigation menu, click Settings.
- Under Administration, click API Credentials.
- In the dropdown list next to the page title, select the access environment. For example, to provision credentials for the test environment, select Test from the dropdown list.
- In the upper right corner of the page, click New Credential.
- Click Save and Generate Key.
Caution: The client secret is displayed only once when you are creating new credentials. You cannot retrieve the secret after exiting this page. Copy and store the client secret securely and share it with authorized individuals in accordance with your organization's security policy.
You can now use the client ID and client secret to generate access tokens using the Request an access token operation.
To get an access token, use the Request an access token operation with your client_id and client_secret. The response contains a token in the access_token field.
We recommend rotating your API credentials at regular intervals according to your organization's security policy.
Note: Authentication tokens are not a fixed length and can vary, avoid validating tokens based on character length.
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/
https://api.test.ripple.com/
https://api.ripple.com/
Authentication
Use these API operations to manage your authentication tokens.
| Operation | Method | Description |
|---|---|---|
| Request an access token | POST | Request an access token for authentication with Ripple APIs. |
| Test access token | GET | Test if an access token can be used for authentication. |
Identities
Use these API operations to manage your identities.
| Operation | Method | Description |
|---|---|---|
| Create an identity | POST | Create a new identity. |
| List identities | GET | Get a list of existing identities. |
| Get an identity by ID | GET | Get an identity by its unique ID. |
| Deactivate an identity | DELETE | Deactivate an identity. |
Payments
Use these API operations to manage your payments.
| Operation | Method | Description |
|---|---|---|
| Search payments | POST | Search for payments based on filtering criteria. |
| Create a payment | POST | Create a payment by accepting a quote. |
| Get payment by payment ID | GET | Get a specific payment by payment ID. |
Quotes
Use these API operations to manage your quotes.
| Operation | Method | Description |
|---|---|---|
| Create quote collection | POST | Create a collection of quotes. |
| Get quote collection | GET | Get a quote collection by ID. |
| Get a quote | GET | Get a specific quote by ID. |
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 the country of incorporation.
The name of the payout category.
| Enum Value | Description |
|---|---|
| BANK | Indicates that the payout will be made in fiat currency to a recipient’s bank account through local banking rails. |
| CRYPTO | Indicates that the payout will be made in stablecoin to a recipient’s crypto wallet address. |
The name of the pay in category indicating how this payment will be funded.
| Enum Value | Description |
|---|---|
| FUNDED | Indicates that the payment is being made from funds you've deposited with Ripple. |
| T_PLUS_ONE | Indicates the payment is being made and you will pay the outstanding invoice. |
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/quotes/quote-collection
- Test environment with simulated currency
https://api.test.ripple.com/v2/quotes/quote-collection
- Production environment
https://api.ripple.com/v2/quotes/quote-collection
- curl
- Python
curl -i -X POST \
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/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": "PH",
"payoutCategory": "BANK",
"payinCategory": "FUNDED",
"destinationBlockchainNetwork": "Ethereum"
}'Creates a collection of quotes
Unique ID that represents this quote collection.
List of quotes
Unique ID that represents this quote.
| Enum Value | Description |
|---|---|
| EXPIRED | Expired quote |
| ACTIVE | Quote that you can accept to create a payment. |
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. |
Amount to be received by destination
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 where the payment originator is located or incorporated, specified in Alpha-2 Code format as defined in the ISO CountryCode ISO 3166-1 list.
The country code to which you wish to send the funds. It follows ISO 3166-1 alpha-2 code
Name of the payout category specified in the quote request.
The name of payin category specified in the quote request.
Foreign Exchange (FX) rate used to calculate the quote.
A summary of fees included in this quote.
An array of fees that provides a breakdown of how the total fees is calculated for this quote.
Value of the fee when the configured fee unit is applied against the value.
The time when this quote was created, specified in UTC.
The time when this quote expires, specified in UTC.
{ "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222", "quotes": [ { … } ] }
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/quotes/quote-collection/{quote-collection-id}
- Test environment with simulated currency
https://api.test.ripple.com/v2/quotes/quote-collection/{quote-collection-id}
- Production environment
https://api.ripple.com/v2/quotes/quote-collection/{quote-collection-id}
- curl
- Python
curl -i -X GET \
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/quotes/quote-collection/11111111-aaaa-2222-bbbb-222222222222 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Valid quote collection found
Unique ID that represents this quote collection.
List of quotes
Unique ID that represents this quote.
| Enum Value | Description |
|---|---|
| EXPIRED | Expired quote |
| ACTIVE | Quote that you can accept to create a payment. |
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. |
Amount to be received by destination
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 where the payment originator is located or incorporated, specified in Alpha-2 Code format as defined in the ISO CountryCode ISO 3166-1 list.
The country code to which you wish to send the funds. It follows ISO 3166-1 alpha-2 code
Name of the payout category specified in the quote request.
The name of payin category specified in the quote request.
Foreign Exchange (FX) rate used to calculate the quote.
A summary of fees included in this quote.
An array of fees that provides a breakdown of how the total fees is calculated for this quote.
Value of the fee when the configured fee unit is applied against the value.
The time when this quote was created, specified in UTC.
The time when this quote expires, specified in UTC.
{ "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222", "quotes": [ { … } ] }
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/quotes/{quote-id}
- Test environment with simulated currency
https://api.test.ripple.com/v2/quotes/{quote-id}
- Production environment
https://api.ripple.com/v2/quotes/{quote-id}
- curl
- Python
curl -i -X GET \
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/quotes/22222222-aaaa-2222-bbbb-222222222222 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Valid quote found
Unique ID that represents this quote.
| Enum Value | Description |
|---|---|
| EXPIRED | Expired quote |
| ACTIVE | Quote that you can accept to create a payment. |
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. |
Amount to be received by destination
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 where the payment originator is located or incorporated, specified in Alpha-2 Code format as defined in the ISO CountryCode ISO 3166-1 list.
The country code to which you wish to send the funds. It follows ISO 3166-1 alpha-2 code
Name of the payout category specified in the quote request.
The name of payin category specified in the quote request.
Foreign Exchange (FX) rate used to calculate the quote.
A summary of fees included in this quote.
An array of fees that provides a breakdown of how the total fees is calculated for this quote.
Value of the fee when the configured fee unit is applied against the value.
The time when this quote was created, specified in UTC.
The time when this quote expires, specified in UTC.
{ "quoteId": "7ea3399c-1234-5678-8d8f-d320ea406630", "quoteStatus": "ACTIVE", "quoteAmountType": "SOURCE_AMOUNT", "sourceAmount": 123.45, "destinationAmount": 2438.19, "sourceCurrency": "USD", "destinationCurrency": "MXN", "sourceCountry": "US", "destinationCountry": "MX", "payoutCategory": "BANK", "payinCategory": "FUNDED", "adjustedExchangeRate": { "adjustedRate": 2 }, "fees": [ { … } ], "createdAt": "2023-11-02T18:26:00.000123Z", "expiresAt": "2023-11-02T18:26:00.000123Z", "destinationBlockchainNetwork": "Ethereum" }
Balances
Use this API operation to view your balances.
| Operation | Method | Description |
|---|---|---|
| Get balances | GET | View your existing balances |