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:
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.
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. |
Request an access token for authentication with Ripple APIs.
You need to request a token for the environment you want to authenticate with.
Note: The length of the access token isn't fixed, hence it can vary. Avoid validating tokens based on character length.
Environment | Domain | Description |
---|---|---|
Test | api.test.ripple.com |
Test environment with simulated currency. |
Production | api.ripple.com |
Production environment for Ripple Payments Direct |
Authorization | string Optional base64-encoded Example: Basic ZGVtbzpwQDU1dzByZA== |
client_id required | string The client ID associated with a specific set of API credentials. | |||||||||
client_secret required | string The client secret associated with a specific set of API credentials. | |||||||||
audience required | string The value of the Format:
Example: | |||||||||
grant_type required | string Set the grant-type for this client credentials request. This must be set to |
Returns the authentication response object that includes the token, type, scopes, and expiry.
Bad Request
Unauthorized
Forbidden
{- "client_id": "{YOUR_CLIENT_ID}",
- "client_secret": "{YOUR_CLIENT_SECRET}",
- "audience": "urn:ripplexcurrent-test:{YOUR_TENANT_ID}",
- "grant_type": "client_credentials"
}
{- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJ",
- "scope": "pos:payments:create quote:quote:read pos:payments:read quote_collection:quote:create pcs_config:external_read data_requirements:read identities:read identities:write identities:create quote_collection:quote:read",
- "expires_in": 3600,
- "token_type": "Bearer"
}
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. |
Create a new identity.
Tutorials
required | object PII data in JSON format. You must use the correct
| ||||||
identityType required | string (identity-type-v2) The type of the identity
| ||||||
nickName | string The nickname for the identity provided at the time of identity creation | ||||||
useCaseType required | string (useCaseType) The use case type for the identity
|
successful operation
Invalid Request
Internal Processing Error
Error when processing the request
{- "piiData": { },
- "identityType": "BENEFICIARY",
- "nickName": "MyCompany",
- "useCaseType": "BUSINESS"
}
{- "identityId": "2f4ac57f-c5ba-4051-b51f-b3565778717b",
- "version": 2
}
Get a list of identities that match the query parameters.
Note: Depending on the number of identities in your account, not all of them may be returned even if they match your query parameters.
Requested identity info in JSON format
Array of objects (identity-v2) The list of the identities that match the query parameters |
Invalid request
No identities found
Internal Processing Error
{- "data": [
- {
- "identityId": "2f4ac57f-c5ba-4051-b51f-b3565778717b",
- "nickName": "MyCompany",
- "createdAt": "2023-11-02T18:26:00.000Z",
- "identityType": "BENEFICIARY",
- "useCaseType": "BUSINESS"
}
]
}
Get an identity by its unique ID
Requested identity info in JSON format
identityId required | string The unique ID of the identity | ||||||||
identityType required | string (identity-type-v2) The type of the identity
| ||||||||
createdAt required | string <date-time> The time at which the identity was created | ||||||||
identityState required | string (state-type) The state of the identity
| ||||||||
nickName | string The nickname for the identity provided at the time of identity creation | ||||||||
required | object PII data in JSON format | ||||||||
version required | integer The version number of the identity | ||||||||
useCaseType required | string (useCaseType) The use case type for the identity
|
Identity ID is not in UUID format
Invalid - identity ID does not exist
Identity ID is an invalid UUID string
Error when processing the request
{- "identityId": "2f4ac57f-c5ba-4051-b51f-b3565778717b",
- "identityType": "BENEFICIARY",
- "createdAt": "2023-11-02T18:26:00.000Z",
- "identityState": "ACTIVE",
- "nickName": "MyCompany",
- "piiData": { },
- "version": 2,
- "useCaseType": "BUSINESS"
}
Delete an identity
The identity was deleted successfully
Identity id is not of UUID format
Invalid Identity id does not exist
Unprocessable Identity Id
Internal Processing Error
Error when processing the request
{- "status": 404,
- "errors": [
- {
- "code": "SYS_100",
- "title": "No identity exists for identityId",
- "type": "USER_VALIDATION_ERROR",
- "description": "Unable to get identity. Identity ID should be in UUID format",
- "timestamp": "2023-11-02T18:26:00.000123Z"
}
], - "timestamp": "2023-11-02T18:26:00.000Z"
}
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. |
Create quote collection request
quoteAmount required | number <double> [ 1 .. 100000000 ] The amount for which you wish to receive a collection of quotes. | ||||||
quoteAmountType required | string (QuoteAmountType) Default: "SOURCE_AMOUNT" The type of amount for which you want to get a quote.
| ||||||
sourceCurrency required | string^[a-zA-Z]{3,5}$ The currency code of the currency that you are sending. | ||||||
destinationCurrency required | string^[a-zA-Z]{3,5}$ The currency code of the currency in which your beneficiary will receive this payment. | ||||||
sourceCountry required | string^[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. | ||||||
destinationCountry required | string^[a-zA-Z]{2}$ The country code of the country where the beneficiary receiving the funds is located. This is an ISO 3166-1 alpha-2 code. | ||||||
payoutCategory required | string [ 1 .. 128 ] characters The name of the payout category.
| ||||||
payinCategory required | string [ 1 .. 128 ] characters The name of the pay in category indicating how this payment will be funded.
|
Creates a collection of quotes
Bad request
Unauthorized request
The principal identified by the authorization header doesn't have enough scopes to perform this operation
Internal server error
{- "quoteAmount": 123.45,
- "quoteAmountType": "SOURCE_AMOUNT",
- "sourceCurrency": "USD",
- "destinationCurrency": "MXN",
- "sourceCountry": "US",
- "destinationCountry": "PH",
- "payoutCategory": "BANK",
- "payinCategory": "FUNDED"
}
{- "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222",
- "quotes": [
- {
- "quoteId": "22222222-aaaa-2222-bbbb-222222222222",
- "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": [
- {
- "totalFee": 3.12,
- "feeCurrency": "USD",
- "feeBreakdown": [
- {
- "calculatedFee": 3.03,
- "feeName": "Service fee",
- "feeDescription": "The service fee charged for this transaction."
}
]
}
], - "createdAt": "2023-11-02T18:26:00.000123Z",
- "expiresAt": "2023-11-02T18:26:00.000123Z"
}
]
}
Valid quote collection found
Unauthorized request
The principal identified by the authorization header doesn't have enough scopes to perform this operation
Quote collection not found
Internal server error
{- "quoteCollectionId": "11111111-aaaa-2222-bbbb-222222222222",
- "quotes": [
- {
- "quoteId": "22222222-aaaa-2222-bbbb-222222222222",
- "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": [
- {
- "totalFee": 3.12,
- "feeCurrency": "USD",
- "feeBreakdown": [
- {
- "calculatedFee": 3.03,
- "feeName": "Service fee",
- "feeDescription": "The service fee charged for this transaction."
}
]
}
], - "createdAt": "2023-11-02T18:26:00.000123Z",
- "expiresAt": "2023-11-02T18:26:00.000123Z"
}
]
}
Valid quote found
quoteId required | string <uuid> [ 1 .. 36 ] characters Unique ID that represents this quote. | ||||||
quoteStatus required | string (QuoteStatus)
| ||||||
quoteAmountType | string (QuoteAmountType) Default: "SOURCE_AMOUNT" The type of amount for which you want to get a quote.
| ||||||
sourceAmount | number <double> [ 1 .. 100000000 ] Amount to be sent by the originator. | ||||||
destinationAmount | number <double> [ 1 .. 100000000 ] Amount to be received by destination | ||||||
sourceCurrency required | string^[a-zA-Z]{3,5}$ The currency code of the currency that you are sending. | ||||||
destinationCurrency required | string^[a-zA-Z]{3,5}$ The currency code of the currency in which your beneficiary will receive this payment. | ||||||
sourceCountry required | string^[a-zA-Z]{2}$ The country code to which you wish to receive the funds. It follows ISO 3166-1 alpha-2 code | ||||||
destinationCountry required | string^[a-zA-Z]{2}$ The country code to which you wish to send the funds. It follows ISO 3166-1 alpha-2 code | ||||||
payoutCategory required | string [ 1 .. 128 ] characters Name of the payout category specified in the quote request. | ||||||
payinCategory required | string [ 1 .. 128 ] characters The name of payin category specified in the quote request. | ||||||
object (AdjustedExchangeRate) Foreign Exchange (FX) rate used to calculate the quote. | |||||||
Array of objects (QuoteQuoteFeeSummary) A summary of fees included in this quote. | |||||||
createdAt | string <date-time> [ 1 .. 128 ] characters The time when this quote was created, specified in UTC. | ||||||
expiresAt | string <date-time> [ 1 .. 128 ] characters The time when this quote expires, specified in UTC. |
Unauthorized request
The principal identified by the authorization header doesn't have enough scopes to perform this operation
Quote not found
Internal server error
{- "quoteId": "22222222-aaaa-2222-bbbb-222222222222",
- "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": [
- {
- "totalFee": 3.12,
- "feeCurrency": "USD",
- "feeBreakdown": [
- {
- "calculatedFee": 3.03,
- "feeName": "Service fee",
- "feeDescription": "The service fee charged for this transaction."
}
]
}
], - "createdAt": "2023-11-02T18:26:00.000123Z",
- "expiresAt": "2023-11-02T18:26:00.000123Z"
}
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. |
Search for payments based on filtering criteria.
Search payments request
object (PaymentFilter) Filter criteria to return desired payment search results. | |
object (Sort) Specify sorting direction and the filtering criterion to sort by. | |
object (Page) Specify page size and the ID of the last fetched result. |
Payments matching the specified filtering criteria.
Array of objects (Payment) Array of Payment objects | |
object (PaymentFilter) Filter criteria to return desired payment search results. | |
object (Page) Specify page size and the ID of the last fetched result. |
Invalid input variables for the request.
Internal processing error
{- "filter": {
- "paymentIds": [
- "aaaaaaaa-1111-bbbb-abab-123412341234"
], - "paymentStates": [
- "INITIATED"
], - "filterRangeType": "PAYMENT_CREATION",
- "beforeTimestamp": "2024-04-24T14:15:22Z",
- "afterTimestamp": "2024-03-24T13:15:22Z",
- "beneficiaryIdentityIds": [
- "aaaaaaaa-1111-bbbb-abab-123412341234"
], - "internalId": "string",
- "beneficiaryIdentityNickname": "Successful business beneficiary",
- "destinationCurrencies": [
- "string"
]
}, - "sort": {
- "sortField": "initiatedAt",
- "sortDirection": "DESC"
}, - "page": {
- "size": 20,
- "lastPageToken": 1738865155690
}
}
{- "data": [
- {
- "paymentId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "initiatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "lastStateUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentState": "INITIATED",
- "originator": {
- "originatorIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "originatorIdentityIdVersion": 1,
- "originatorIdentityNickName": "Successful Business Sender",
- "internalId": "Invoice-123",
- "sourceCountry": "US",
- "sourceCurrency": "USD",
- "sourceAmount": 100,
- "payin": "FUNDED"
}, - "destination": {
- "destinationAmount": 1234.111223,
- "destinationCountry": "US",
- "destinationCurrency": "USD",
- "beneficiaryIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "beneficiaryIdentityVersion": 1,
- "beneficiaryIdentityNickName": "Successful business beneficiary",
- "payout": "BANK"
}, - "fxRate": 2,
- "fees": [
- {
- "totalFee": 12.23,
- "feeCurrency": "USD"
}
], - "sourceOfCash": "EMIN",
- "purposeCode": "PAYR"
}
], - "filter": {
- "paymentIds": [
- "aaaaaaaa-1111-bbbb-abab-123412341234"
], - "paymentStates": [
- "INITIATED"
], - "filterRangeType": "PAYMENT_CREATION",
- "beforeTimestamp": "2024-04-24T14:15:22Z",
- "afterTimestamp": "2024-03-24T13:15:22Z",
- "beneficiaryIdentityIds": [
- "aaaaaaaa-1111-bbbb-abab-123412341234"
], - "internalId": "string",
- "beneficiaryIdentityNickname": "Successful business beneficiary",
- "destinationCurrencies": [
- "string"
]
}, - "page": {
- "size": 20,
- "lastPageToken": 1738865155690
}
}
Create a payment
create payment request
quoteId required | string <uuid> ID of the quote you want to accept to initiate this payment. Must be in UUID format. This will be used as paymentId. | ||||||||||||||||||||||||||||||||||||
originatorIdentityId | string <uuid> The identity ID of the payment originator in UUID format. You can find the identity ID using the | ||||||||||||||||||||||||||||||||||||
beneficiaryIdentityId required | string <uuid> The identity ID of the payment beneficiary in UUID format. You can find the identity ID using the | ||||||||||||||||||||||||||||||||||||
internalId | string <= 36 characters Customer defined value, such as an invoice number. | ||||||||||||||||||||||||||||||||||||
purposeCode | string Indicates the purpose of the payment For more information about the | ||||||||||||||||||||||||||||||||||||
sourceOfCash | string Source of cash for payout.
|
Valid payment
paymentId required | string <uuid> <= 36 characters The unique ID that identifies this payment. This value is the same as the quote ID. | ||||||||||||||||||||||||||||||||||||
initiatedAt | string <date-time> The time at which the payment was initiated, specified in UTC. | ||||||||||||||||||||||||||||||||||||
expiresAt | string <date-time> The time at which this payment expires, specified in UTC. | ||||||||||||||||||||||||||||||||||||
lastStateUpdatedAt | string <date-time> The time at which the payment state was last updated for this payment, specified in UTC. | ||||||||||||||||||||||||||||||||||||
paymentState required | string (PaymentState)
| ||||||||||||||||||||||||||||||||||||
object (Originator) Payment originator and source details. | |||||||||||||||||||||||||||||||||||||
object (Destination) Payment beneficiary and destination details. | |||||||||||||||||||||||||||||||||||||
fxRate | number <double> The quoted foreign exchange rate for this payment. | ||||||||||||||||||||||||||||||||||||
Array of objects (FeeSummary) A summary of fees included in payment quote. | |||||||||||||||||||||||||||||||||||||
sourceOfCash | string Indicates the source of funds
| ||||||||||||||||||||||||||||||||||||
purposeCode | string Indicates the purpose of the payment For more information about the |
Invalid input variables for the payment.
Problems related to payment limits.
Internal processing error
{- "quoteId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "originatorIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "beneficiaryIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "internalId": "Invoice-123",
- "purposeCode": "PAYR",
- "sourceOfCash": "EMIN"
}
{- "paymentId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "initiatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "lastStateUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentState": "INITIATED",
- "originator": {
- "originatorIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "originatorIdentityIdVersion": 1,
- "originatorIdentityNickName": "Successful Business Sender",
- "internalId": "Invoice-123",
- "sourceCountry": "US",
- "sourceCurrency": "USD",
- "sourceAmount": 100,
- "payin": "FUNDED"
}, - "destination": {
- "destinationAmount": 1234.111223,
- "destinationCountry": "US",
- "destinationCurrency": "USD",
- "beneficiaryIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "beneficiaryIdentityVersion": 1,
- "beneficiaryIdentityNickName": "Successful business beneficiary",
- "payout": "BANK"
}, - "fxRate": 2,
- "fees": [
- {
- "totalFee": 12.23,
- "feeCurrency": "USD"
}
], - "sourceOfCash": "EMIN",
- "purposeCode": "PAYR"
}
Gets a payment by ID.
Successfully fetched payment details.
paymentId required | string <uuid> <= 36 characters The unique ID that identifies this payment. This value is the same as the quote ID. | ||||||||||||||||||||||||||||||||||||
initiatedAt | string <date-time> The time at which the payment was initiated, specified in UTC. | ||||||||||||||||||||||||||||||||||||
expiresAt | string <date-time> The time at which this payment expires, specified in UTC. | ||||||||||||||||||||||||||||||||||||
lastStateUpdatedAt | string <date-time> The time at which the payment state was last updated for this payment, specified in UTC. | ||||||||||||||||||||||||||||||||||||
paymentState required | string (PaymentState)
| ||||||||||||||||||||||||||||||||||||
object (Originator) Payment originator and source details. | |||||||||||||||||||||||||||||||||||||
object (Destination) Payment beneficiary and destination details. | |||||||||||||||||||||||||||||||||||||
fxRate | number <double> The quoted foreign exchange rate for this payment. | ||||||||||||||||||||||||||||||||||||
Array of objects (FeeSummary) A summary of fees included in payment quote. | |||||||||||||||||||||||||||||||||||||
sourceOfCash | string Indicates the source of funds
| ||||||||||||||||||||||||||||||||||||
purposeCode | string purposeCode for RPD payments | ||||||||||||||||||||||||||||||||||||
Array of objects (PaymentError) |
Invalid input variables for the payment.
Payment not found.
Internal processing error
{- "paymentId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "initiatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "lastStateUpdatedAt": "2019-08-24T14:15:22Z",
- "paymentState": "INITIATED",
- "originator": {
- "originatorIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "originatorIdentityIdVersion": 1,
- "originatorIdentityNickName": "Successful Business Sender",
- "internalId": "Invoice-123",
- "sourceCountry": "US",
- "sourceCurrency": "USD",
- "sourceAmount": 100,
- "payin": "FUNDED"
}, - "destination": {
- "destinationAmount": 1234.111223,
- "destinationCountry": "US",
- "destinationCurrency": "USD",
- "beneficiaryIdentityId": "7ea3399c-1234-5678-8d8f-d320ea406630",
- "beneficiaryIdentityVersion": 1,
- "beneficiaryIdentityNickName": "Successful business beneficiary",
- "payout": "BANK"
}, - "fxRate": 2,
- "fees": [
- {
- "totalFee": 12.23,
- "feeCurrency": "USD"
}
], - "sourceOfCash": "EMIN",
- "purposeCode": "string",
- "errors": [
- {
- "code": "SYS_003",
- "type": "SYSTEM_ERROR",
- "title": "Internal Server Error",
- "description": "The payout category value must be one of BANK, EWALLET, CASH_PICKUP, or ATM.",
- "timestamp": "2024-11-21T14:15:22Z"
}
]
}
Gets the state transitions for a payment by ID.
Successfully fetched payment state transitions.
required | Array of objects (StateTransition) |
Invalid input variables for the payment.
Payment not found.
Internal processing error
{- "stateTransitions": [
- {
- "updatedFrom": "INITIATED",
- "updatedTo": "INITIATED",
- "updatedAt": "2024-08-13T20:15:50.990995Z"
}
]
}