You need to create an identity for the beneficiary or originating party so they can be identified in the payment request.
Identities in Ripple Payments are objects that correspond to payment participants, such as payment originators and beneficiaries of payments. They contain all of the personally identifiable information (PII) connected to a specific individual or business to ensure proper compliance and proper routing.
This guide walks you through the API calls required to create an identity.
While this tutorial focuses on creating a BENEFICIARY, the process is similar for an ORIGINATOR.
You should have the following items before you continue:
- An access token to access secured API endpoints.
Now we'll build the request for an identity token. This token will then be used to create the payment.
This example uses the create a new identity operation to create a new identity of the type BENEFICIARY.
identityType: This example usesBENEFICIARYto create a beneficiary identity.nickName: This example uses a recognizable name such asSuccessful Business Beneficiary.useCaseType: This example usesBUSINESSto indicate creating a business identity.piiData: Populate this object with the required PII information for the chosenidentityType.
- UAT 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://api.test.ripple.com/v2/identities \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"piiData": {},
"identityType": "BENEFICIARY",
"nickName": "MyCompany",
"useCaseType": "BUSINESS"
}'Store the identityId value for use later with the create payment operation.
{
"identityId": "22222222-aaaa-2222-bbbb-222222222222",
"version": 2
}You can use the identityId with the get an identity by ID operation to view the newly created identity.