Create Payment Credential

The Create Payment Credential endpoint enables you to create a new Payment Credential for an existing alias.

You can create a payment credential for an alias by making a POST request to the Create Payment Credential endpoint, where aliasId is the identifier for the alias you want to add a payment credential to. For example:

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

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.

{
    "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"
            }
        }
    }
}

If successful, a 200 response is returned.

{
  "status": "success",
  "response": {
    "trackingId": "alias#-64111a56-20250602063331",
    "paymentCredentialId": "a44c9553-e687-4f3c-b7e7-a4245d9f238e",
    "type": "CARD",
    "externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85"
  }
}

📘

More Information