A quick introduction for creating and resolving your first Alias.
Create an account on Visa Developer and add Alias Directory to your project. Click this link for an example of creating a project and adding APIs.
Connect to the Create Alias API in the Sandbox. Use the below code in your Create Alias API request body. Please fill the alias Value prior to submitting the request.
{
"aliasValue": "{CREATE YOUR OWN VALUE HERE}",
"aliasType": "PHONE",
"profile": {
"firstName": "John",
"lastName": "D"
},
"consent": {
"presenter": "Bank A",
"validFromDateTime": "2022-03-30T04:43:22.043Z",
"expiryDateTime": "2022-06-20T10:00:00Z",
"version": "1.0"
},
"paymentCredentials": [
{
"type": "CARD",
"preferredFor": [
{
"type": "RECEIVE"
}
],
"nameOnCard": "John Doe",
"accountNumber": "4000000000000000",
"expirationDate": "2030-01",
"billingAddress": {
"addressLine1": "100 Main Street",
"addressLine2": "Suite 101",
"city": "San Francisco",
"postalCode": "94105",
"state": "CA",
"country": "USA"
}
}
]
}
You should receive a successful response like the below. The phone number and card are now linked.
{
"id": "df844b33-0712-4783-9f84-55d5d90eb2df",
"paymentCredentials": [
{
"type": "CARD",
"id": "752c1fc5-b13b-4903-a725-090601d26f22"
}
]
}
Now use the Resolve API to retrieve the payment credential. Use the below code in the Resolve API request body.
{
"aliasValue": "{USE PHONE NUMBER FROM PREVIOUS STEP}",
"aliasType": "PHONE"
}
You should now be able to see the details associated with the Alias in the response.
{
"identification": {},
"profile": {
"firstName": "John",
"lastName": "D"
},
"paymentCredentials": [
{
"type": "CARD",
"accountNumber": "4000000000000000",
"preferredOn": "2022-10-24T19:35:34.654487Z",
"nameOnCard": "John Doe",
"expirationDate": "2030-01",
"billingAddress": {
"city": "San Francisco",
"country": "USA",
"addressLine1": "100 Main Street",
"state": "CA",
"postalCode": "94105",
"addressLine2": "Suite 101"
}
}
],
"directoryName": "STANDARD_91D614C3"
}
Alias Directory allows clients to create Aliases and manage their lifecycle, e.g., update and delete.
Key Terms | Definitions |
---|---|
Participants |
|
Alias |
|
Profile |
|
Payment Credential |
|
Program |
|
The below diagram is a simple visual of how this data is mapped in Alias Directory. In the below example
API |
Description |
---|---|
Create Alias |
|
Update Alias |
|
Delete Alias |
|
Create Payment Credential |
|
Get All Payment Credentials |
|
Get Payment Credential |
|
Update Payment Credential |
|
Delete Payment Credential |
|
Possible Alias statuses:
Status |
Comments |
---|---|
Active |
|
Deleted |
|
Blocked |
|
Disabled |
|
Expired |
|
Possible Payment Credential statuses:
Status |
Comments |
---|---|
Active |
|
Deleted |
|
Blocked |
|
Disabled |
|
Expired |
|
Alias Directory offers clients a number of options for managing their Alias records. Clients may already have an existing id used for their consumer's Alias data and can reuse that id as an externalId
.
In the Create Alias call, an id
; is returned for the Alias (Line 2) and for each payment credential (Line 6 & 12). Each id
is internally generated by Alias Directory and used for identifying each record. Clients can provide an externalId
during the Create Alias API and each externalId
will be associated with an internal id
In the below example, the externalId
is returned in Lines 3,8, and 13.
{
"id": "0ddaa171-5247-424a-a562-40788940c5cf",
"externalId": "ec66fd21-a328-4943-bb0d-c011b27553b5",
"paymentCredentials": [
{
"type": "CARD",
"id": "6ef14e04-6d0d-4ec7-b14b-335a46ae45e4",
"externalId": "0e1d1bdf-11a6-4fa9-bd8d-687c465f7bec"
},
{
"type": "BANK",
"id": "e6782b9b-0dc8-4669-a5f4-394519e49986",
"externalId": "4f8b8823-230b-4ffb-b57b-72300ceec150"
}
]
}
To perform lifecycle management, clients must use the internal <code>id</code>. If the client is only storing the <code>externalId</code>, the clients must first retrieve the internal <code>id</code> by calling the Get By External ID API and including <code>externalId</code> in the request. See below request example:
{
"type":"ALIAS",
"externalId":"ec66fd21-a328-4943-bb0d-c011b27553b5"
}
The response returns the internal id
, which can then be used for lifecycle management. See below response example.
Clients can also retrieve the internal <code>id</code> of an Alias using the Alias value itself. This can be done via the Get Alias Id From Value API. See below a sample request:
{
"aliasValue": "6886217206"
}
The response will include the id
of the Alias.
{
"id": "0ddaa171-5247-424a-a562-40788940c5cf"
}
There are two APIs within the Alias Resolution bundle
Alias Resolution - Retrieve information about an Alias and the payment credential(s) associated with the Alias.
Alias Inquiry - Enables clients to check if an Alias or list of Aliases is available for Alias resolution. The response will indicate the Aliases that are available for Alias resolution.
Alias Directory currently supports the following Alias types: Phone, Email, Directory_AliasID.
Directory_AliasID
is a unique identifier which is associated with an Alias. This is used by some wallets in certain markets. For example, in the Peru market, the Directory_AliasID is derived from a QR code, which is associated with an Alias in a particular wallet.Alias Directory supports a number of filters which can be applied to the Alias Resolution request.
Directory_Name
- Send Alias Resolution to only this directoryExcluded_Directory_Name
- Exclude this directory in the Alias ResolutionEntity_ID
- The entity Id is used to identify the specific participant that created an Alias record. In the local directory, the entity ID is the participant who created the Alias record in the local directory. For remote directories, the entity Id is used by some remote directories to identify the entities within their directory. For example, a remote directory may have multiple banks within its directory. The Alias Resolution request can be sent to a specific bank within that remote directory by using that bank’s entity ID.
{
"summary": {
"aliasesTotal": 1,
"aliasesFound": 1,
"aliasesNotFound": 0,
"aliasesRepeated": 0
},
"details": [{
"directoriesName": ["STANDARD_VISA"],
"directories": [{
"directoryName": "STANDARD_VISA",
"entities": [{
"id": "593f1c3b-73f8-4379-9a82-94f8af407173",
"preferredFor": [{
"type": "RECEIVE",
"date": "2024-08-13T05:23:47.985Z"
}]
}]
}],
"aliasValue": "411223344555",
"aliasType": "PHONE"
}]
}
currencyCode
- Allows a client to specify the currency of the payment credential returned in the Alias Resolution response. Some clients have different payment credentials for different currencies. By providing the currencyCode, a client can specify currency of the payment credential needed in the Alias Resolution response. Rule Name |
Description |
---|---|
Preferred Payment Credential |
|
Preferred Payment Credential Timestamp |
|
Phone |
Participant |
Marked as Preferred? |
Preferred Timestamp |
---|---|---|---|
6505001234 |
Bank A (Local Directory) |
Yes |
1:00 pm, June 1, 2023 |
6505001234 |
Bank B (Remote Directory) |
Yes |
4:00 pm, June 10, 2023 |
6505001234 |
Bank C (Local Directory) |
No |
|
Given the above example, Alias Resolution would return Bank B’s Payment Credential.
Integration with Cybersource Token Management Service
Alias Directory Service supports tokenization for payment instruments through an integration with Cybersource Token Management Service. Token Management Service (TMS) creates a network token, which Alias Directory stores and associates with an Alias. The token protects sensitive customer payment data stored in secure Visa data centers and can be used in place of a PAN in an OCT.
Alias Directory currently uses TMS for tokenizing Visa payment credentials.
Please visit this link to learn more about Cybersource Token Management Service https://developer.cybersource.com/docs/cybs/en-us/tms/developer/ctv/rest/tms/tms-overview.html
Local Directory Tokenization
Remote Directory Tokenization
This section details the case where a Remote Directory is providing a payment instrument to Alias Directory Service for use in Alias Resolve.
Non-PCI Compliance and Tokenization
Clients who are configured as non-PCI compliant are now supported through the use of tokenization.
On-Behalf-Of processing allows processors, or technical service providers (TSPs) to enable the Visa Alias Directory Service for multiple clients using a single project on Visa Developer Center.
When Visa Alias Directory receives an API call with the On-Behalf-Of header, it will process the API call as if received from the client identified by that header.
It is important to include the correct participant ID in the On-Behalf-Of header as this ensures Visa Alias Directory processes the request correctly:
This section provided detailed instruction for testing OCTs in VCMS with Alias Directory. Please follow the following steps for end-to-end testing:
Alias Directory Service provides APIs for requesting and downloading reports. The available endpoints are listed below
Client
Create a report request
Visa
Return report ID
Client
Check report status
Client
Download completed report
Step |
Endpoint |
Description |
Additional Details |
---|---|---|---|
Create Report |
/reports (POST) |
Create a report, specify the report type and define the parameters.
|
The field type specifies the type of report to be generated
The field filters defines the parameters used to create the report (e.g., startDate, endDate) Alias Directory will create the report offline and clients can download in the subsequent steps. |
Get Report |
/reports/{reportId} (GET) |
Retrieves information about a specific Create Report request. |
Clients can use this endpoint to check the status of a Create Report request. For example, the create report request may be “completed” or “in-progress” The response of this will also include the field "fileIds". The fileId will be used to download the report. Please note some reports may have multiple files due to the size of the report.
|
Download Report |
/reports/{reportId}/file/{fileId} (GET) |
Retrieves a file from a previously requested report with COMPLETED status. |
This endpoint returns a base64 encoded file in csv format.
|
Report Description:
Report Fields:
Field Name: originationDateTime
Description: The date and time of the Alias Resolution request
Example: 2021-01-01T10:52:46.000Z
Field Name: programId
Description: The guid of the program that the participant belongs in
Example: a5d0bd35-16f5-4e98-86f5-b1a464215a63
Field Name: originatorActorId
Description: Participant id of the entity which sent the request
Example: 6ac54662-84da-401d-aab5-b86bac9a02a0
Field Name: onBehalfOf
Description: Participant id which the original_actor_id sent the request on behalf of. This is only applicable in certain cases.
Example: 1ff54662-84da-401d-aab5-b86bac9a02a2
Field Name: resolvedAlias
Description: The Alias value provided in the Alias Resolution request
Example: 123456789
Field Name: resolvedPaymentCredentialType
Description: The type of payment credential returned in the Alias Resolution response
Example: CARD
Field Name: statusCode
Description: The status code returned in the API response
Example: 200
Field Name: resolvedDirectory
Description: The name of the directory which returned the payment credential
Example: Directory A
Report Sample
[
{
"originationDateTime": "2023-07-31T20:15:18.679Z",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"statusCode": 200
},
{
"originationDateTime": "2023-07-31T20:23:49.618Z",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"statusCode": 200
}
]
Report Description:
Report Fields:
Field Name: programId
Description: The guid of the program that the participant belongs in
Example: a5d0bd35-16f5-4e98-86f5-b1a464215a63
Field Name: ownerParticipantId
Description: The participant id which owns this Alias and payment credential information
Example: 6ac54662-84da-401d-aab5-b86bac9a02a0
Field Name: objectType
Description: The type of this object
Possible values: ALIAS, PAYMENT_CREDENTIAL
Field Name: objectSubType
Description: The sub_type of this object
Possible values:
For Object_Type = ALIAS, then possible subtypes are: PHONE, EMAIL
For Object_Type = PAYMENT_CREDENTIAL, then possible subtypes are: CARD, BANK
Field Name: status
Description: The status of this object
Possible values: ACTIVE, DISABLED, BLOCKED, DELETED
Field Name: objectCount
Description: The number of types this object is in the Alias Directory
Example: 1200
Report Sample
[
{
"programId": "c0af8887-eac3-4b89-ad35-73c66e22088e",
"ownerParticipantId": "d1ebd0da-54e5-493a-9ba3-4ccc21a183cc",
"objectType": "ALIAS",
"objectSubType": "PHONE",
"status": "ACTIVE",
"objectCount": 763739
},
{
"programId": "c0af8887-eac3-4b89-ad35-73c66e22088e",
"ownerParticipantId": "d1ebd0da-54e5-493a-9ba3-4ccc21a183cc",
"objectType": "ALIAS",
"objectSubType": "BANK",
"status": "ACTIVE",
"objectCount": 8772470
}
]
Report Description:
Report Fields:
Field Name: paymentCredentialCreatedDateTime
Description: The time the payment credential was created
Example: 2021-01-01T10:52:46.000Z
Field Name: programId
Description: The guid of the program that the participant belongs in
Example: a5d0bd35-16f5-4e98-86f5-b1a464215a63
Field Name: ownerParticipantId
Description: Participant id which created the payment credential
Example: 9ed54662-84da-401d-aab5-b86bac9a02a0
Field Name: paymentCredentialId
Description: The internal ID of the payment credential
Example: 40f26d01-28b8-4261-8d9d-638e2bade69c
Field Name: paymentCredentialType
Description: The type of the payment credential
Example: CARD
Field Name: accountNumberLast4
Description: The last four digits of the account
Example: 3456
Field Name: paymentCredentialStatus
Description: The status of the payment credential
Example: ACTIVE
Field Name: aliasId
Description: The internal ID of the Alias associated with this payment credential
Example: daa3ceaa-c3d5-4b3c-b03e-9bc1eed60b78
Field Name: aliasValue
Description: The value of the Alias associated with this payment credential
Example: 51991512051
Field Name: aliasType
Description: The type of Alias
Example: Phone
Report Sample
[
{
"paymentCredentialCreatedDateTime": "2023-07-31T20:06:01.654426Z",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"ownerParticipantId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"paymentCredentialId": "06eeb39a-696a-4c6a-84f8-f3b2ad27ca11",
"paymentCredentialType": "BANK",
"accountNumberLast4": "1140",
"paymentCredentialStatus": "ACTIVE",
"aliasId": "967a3033-5cd3-4fe1-b09f-b6e4f1da5855",
"aliasValue": "7568893885",
"aliasType": "PHONE"
},
{
"paymentCredentialCreatedDateTime": "2023-07-31T20:10:43.339798Z",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"ownerParticipantId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"paymentCredentialId": "1693aa4c-cb16-42ca-afa5-f0b6d6f75aeb",
"paymentCredentialType": "BANK",
"accountNumberLast4": "1140",
"paymentCredentialStatus": "ACTIVE",
"aliasId": "9564fb2a-c19c-4082-a973-c5233e5b0f24",
"aliasValue": "9049748451",
"aliasType": "PHONE"
}
]
Report Description:
Report Fields:
Field Name: programId
Description: The guid of the program that the participant belongs in
Example: a5d0bd35-16f5-4e98-86f5-b1a464215a63
Field Name: originatorActorId
Description: Participant id of the entity which sent the request
Example: 6ac54662-84da-401d-aab5-b86bac9a02a0
Field Name: onBehalfOf
Description: Participant id which the original_actor_id sent the request on behalf of. This is only applicable in certain cases.
Example: 1ff54662-84da-401d-aab5-b86bac9a02a2
Field Name: operationType
Description: The type of operation the report must include.
Possible values:
aliasInquiry
createAlias
createBatch
createPaymentCredential
createReport
deleteAlias
deletePaymentCredential
getAlias
getAliasId
getAliasOnlineReport
getBatch
getBatchKeys
getBatchResult
getByExternalId
getPaymentCredential
getPaymentCredentials
getReport
getReportFile
resolveAlias
updateAlias
updateAliasStatus
updateBankPaymentCredential
Field Name: statusCode
Description: The status code returned in the API response
Example: 200
Field Name: operationsCount
Description: The aggregated amount of the number of requests
Example: 99
Report Sample
[
{
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"operationType": "resolveAlias",
"statusCode": 200,
"operationsCount": 18
},
{
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"operationType": "resolveAlias",
"statusCode": 422,
"operationsCount": 4
}
]
Report Description:
Report Fields:
Field Name: resolveDirectory
Description: The directory which received the Alias Resolution requests.
Example: Directory A
Field Name: programId
Description: The guid of the program that the participant belongs in
Example: a5d0bd35-16f5-4e98-86f5-b1a464215a63
Field Name: originatorActorId
Description: Participant id of the entity which sent the request
Example: 6ac54662-84da-401d-aab5-b86bac9a02a0
Field Name: onBehalfOf
Description: Participant id which the original_actor_id sent the request on behalf of. This is only applicable in certain cases.
Example: 1ff54662-84da-401d-aab5-b86bac9a02a2
Field Name: operationType
Description: The type of operation the report must include.
Possible values:
resolve_Alias
Field Name: statusCode
Description: The status code returned in the API response
Example: 200
Field Name: requestCount
Description: Total number of Alias Resolution requests
Example: 1200
Report Sample
[
{
"resolveDirectory": "STANDARD_5EF147CC",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"operationType": "resolve_alias",
"statusCode": 422,
"requestCount": 0
},
{
"resolveDirectory": "STANDARD_GTB094FB",
"programId": "baf85624-3cf6-4c52-b91f-b8f3493e7330",
"originatorActorId": "012af73f-44d8-4c9c-bbee-628b07faae1c",
"operationType": "resolve_alias",
"statusCode": 200,
"requestCount": 0
}
]