Create Alias

The Create Alias endpoint enables you to create an alias in the Alias Directory and associate one or more payment credentials with the Alias.

You can create an alias by making a POST request to the Create Alias endpoint. For example:

{{base-url}}/ads/api/v1/aliases

The POST body should include the details of the payment type and the alias info. The below is an example of the body when the payment type is set to CARD.

{
    "aliasInfo": {
        "type": "PHONE",
        "value": "1231231234",
        "externalId": "21267931-7975-4b61-be7a-86915883b2b4"
    },
    "paymentType": "CARD",
    "paymentInfo": {
        "cardInfo": {
            "nameOnCard": "Alex Miller",
            "issuerName": "Bank A",
            "cardType": "Visa Platinum",
            "expirationDate": "2030-01",
            "externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85",
            "currencyCode": "USD",
            "preferredFor": [ { "type": "RECEIVE" } ],
            "billingAddress": {
                "country": "USA",
                "addressLine1": "1000 Market Street",
                "addressLine2": "Suite 101",
                "buildingNumber": "56",
                "city": "San Francisco",
                "minorSubdivisionCode": "CA",
                "streetName": "12",
                "postalCode": "94105",
                "state": "CA"
            },
            "accountNumber": "411*****455***42"
        },
        "bankInfo": {
            "accountName": "Alex Miller",
            "accountNumber": "411*****455***42",
            "accountNumberType": "DEFAULT",
            "accountType": "SAVING",
            "bankName": "Bank A",
            "bankCode": "173",
            "branchCode": "123456",
            "bankCodeType": "ABA",
            "bic": "AAAABBCC123",
            "countryCode": "USA",
            "currencyCode": "USD",
            "externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85",
            "address": {
                "country": "USA",
                "addressLine1": "1000 Market Street",
                "addressLine2": "Suite 101",
                "buildingNumber": "56",
                "city": "San Francisco",
                "minorSubdivisionCode": "CA",
                "streetName": "12",
                "postalCode": "94105",
                "state": "CA"
            },
            "preferredFor": [ { "type": "RECEIVE" } ]
        },
        "threddInfo": {
            "accountNumber": "238915978",
            "nameOnCard": "Alex Miller",
            "issuerName": "Bank A",
            "cardType": "Visa Platinum",
            "externalIdForCard": "63421837-d597-4f0f-89e4-930c1a7b9e85",
            "currencyCode": "USD",
            "preferredFor": [ { "type": "RECEIVE" } ],
            "billingAddress": {
                "country": "USA",
                "addressLine1": "1000 Market Street",
                "addressLine2": "Suite 101",
                "buildingNumber": "56",
                "city": "San Francisco",
                "minorSubdivisionCode": "CA",
                "streetName": "12",
                "postalCode": "94105",
                "state": "CA"
            }
        }
    },
    "identificationInfo": {
        "type": "PASSPORT",
        "value": "A123456",
        "verificationInfo": {
            "isPhoneVerified": "false",
            "authMethodReference": "EXTERNAL",
            "authDateTime": "2021-01-01T22:52:46Z",
            "isEmailVerified": "true",
            "creationDateTime": "2021-01-01T22:52:46Z"
        }
    },
    "consentInfo": {
        "presenter": "Bank A",
        "validFromDateTime": "2021-12-01T10:00:00Z",
        "version": "1.0",
        "expiryDateTime": "2025-06-11T10:00:00Z",
        "intermediaries": [ "Client A" ]
    },
    "profileInfo": {
        "firstName": "Alex",
        "lastName": "Miller",
        "firstNameLocal": "Alexander",
        "lastNameLocal": "Miller",
        "middleName": "Robert",
        "middleNameLocal": "Roberto",
        "preferredName": "Miller's Shop",
        "dateOfBirth": "1980-02-01",
        "contactInfo": [
            { "type": "PHONE", "value": "1231234321" },
            { "type": "EMAIL", "value": "[email protected]" }
        ]
    }
}

If successful, a 200 response is returned.

{
  "status": "success",
  "response": {
    "aliasId": "e336c8c8-2945-4be3-af3e-951ec2d01219",
    "externalId": "21267931-7975-4b61-be7a-86915883b2b4", //optional
    "trackingId": "87347931-5975-4b61-be7a-86915883b2c6",
    "paymentCredentials": [
      {
        "id": "a44c9553-e687-4f3c-b7e7-a4245d9f238e",
        "type": "CARD",
        "externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85"
      },
      {
        "id": "t45c9553-e687-4f3c-b7e7-a4245d9f238e",
        "type": "BANK",
        "externalId": "09321837-d597-4f0f-89e4-930c1a7b9e85"
      }
    ]
  }
}
📘

More Information