The type of the identity
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. |
PII data in JSON format.
You must use the correct piiData schema for the type of identity you want to create.
Note: Reach out to your Ripple liaison to get this schema.
| Enum Value | Description |
|---|---|
| BENEFICIARY | Identity associated with the beneficiary. |
| ORIGINATOR | Identity associated with the party originating the payment. |
The nickname for the identity provided at the time of identity creation
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/identities
- Test environment with simulated currency
https://api.test.ripple.com/v2/identities
- Production environment
https://api.ripple.com/v2/identities
- 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/identities \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"piiData": {},
"identityType": "BENEFICIARY",
"nickName": "MyCompany",
"useCaseType": "BUSINESS"
}'{ "identityId": "2f4ac57f-c5ba-4051-b51f-b3565778717b", "version": 2 }
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/identities
- Test environment with simulated currency
https://api.test.ripple.com/v2/identities
- Production environment
https://api.ripple.com/v2/identities
- 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/identities?identityType=BENEFICIARY&nickName=Successful+Beneficiary' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Requested identity info in JSON format
The list of the identities that match the query parameters
The unique ID of the identity
The nickname of the identity provided at the time of identity creation.
The time at which the identity was created
The type of the identity
| Enum Value | Description |
|---|---|
| BENEFICIARY | Identity associated with the beneficiary. |
| ORIGINATOR | Identity associated with the party originating the payment. |
{ "data": [ { … } ] }
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/identities/{identity-id}
- Test environment with simulated currency
https://api.test.ripple.com/v2/identities/{identity-id}
- Production environment
https://api.ripple.com/v2/identities/{identity-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/identities/146f3c51-c313-47ce-b6f2-691c5a238b3e?version=2' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Requested identity info in JSON format
The unique ID of the identity
The type of the identity
| Enum Value | Description |
|---|---|
| BENEFICIARY | Identity associated with the beneficiary. |
| ORIGINATOR | Identity associated with the party originating the payment. |
The time at which the identity was created
The state of the identity
| Enum Value | Description |
|---|---|
| ACTIVE | The identity requested exists and is active. |
| BLOCKED | The identity requested exists, but is blocked. |
| DEACTIVATED | The identity requested has been deactivated. |
The nickname for the identity provided at the time of identity creation
{ "identityId": "2f4ac57f-c5ba-4051-b51f-b3565778717b", "identityType": "BENEFICIARY", "createdAt": "2023-11-02T18:26:00.000Z", "identityState": "ACTIVE", "nickName": "MyCompany", "piiData": {}, "version": 2, "useCaseType": "BUSINESS" }
- Mock server
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/identities/{identity-id}
- Test environment with simulated currency
https://api.test.ripple.com/v2/identities/{identity-id}
- Production environment
https://api.ripple.com/v2/identities/{identity-id}
- curl
- Python
curl -i -X DELETE \
https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/identities/146f3c51-c313-47ce-b6f2-691c5a238b3e \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'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. |
Balances
Use this API operation to view your balances.
| Operation | Method | Description |
|---|---|---|
| Get balances | GET | View your existing balances |