POST//////
Use this endpoint to create a payment credential associated with a Visa Alias.
Header parameter
| Fields | Description |
|---|---|
| req-sys-id string Required | Identifier generated by the card program. These identifiers are used for troubleshooting requests between the card program and Marqeta. Allowable Values: 36 char max |
| participant-id string Required | Visa Business Identifier (BID) that is assigned to the program. Allowable Values: Existing participant ID |
URL path parameters
| Fields | Description |
|---|---|
| aliasId string Required | Unique identifier of the Visa Alias. Allowable Values: Existing Visa Alias ID |
Request body
| Fields | Description |
|---|---|
| cardToken string Required | Unique identifier of the card token. Allowable Values: 1–36 chars Existing card token |
| billingAddress object Required | Billing address for the payment credential. Allowable Values: country, addressLine1, addressLine2, buildingNumber, city, minorSubdivision, postalCode, state, streetName |
| billingAddress.country string Required | Country of the billing address associated with the payment credential, expressed as an ISO 3166 code. For example, the numeric code for the United States is 840 and the alpha-3 code is USA.The ISO maintains the full list of ISO 3166 country codes. Allowable Values: 3 chars |
| billingAddress.addressLine1 string Optional | Address line 1 of the billing address associated with the payment credential. Allowable Values: 99 char max |
| billingAddress.addressLine2 string Optional | Address line 2 of the billing address associated with the payment credential. Allowable Values: 99 char max |
| billingAddress.buildingNumber string Optional | Building number of the billing address associated with the payment credential. Allowable Values: 1–60 chars |
| billingAddress.city string Optional | City of the billing address associated with the payment credential. Allowable Values: 1–35 chars |
| billingAddress.minorSubdivision string Optional | Minor subdivision of the billing address associated with the payment credential. Allowable Values: 1–50 chars |
| billingAddress.postalCode string Optional | Postal code of the billing address associated with the payment credential. Allowable Values: 1–16 chars |
| billingAddress.state string Optional | State of the billing address associated with the payment credential. Allowable Values: 1–16 chars |
| billingAddress.streetName string Optional | Street name of the billing address associated with the payment credential. Allowable Values: 1–60 chars |
| nameOnCard string Required | Name on the card for the payment credential. Allowable Values: 1–120 chars |
| cardType string Required | Type of card for the payment credential. Allowable Values: 1–70 chars |
| issuerName string Required | Card issuer’s name for the payment credential. Allowable Values: 1–150 chars |
| currencyCode string Optional | Three-digit ISO 4217 currency code for the payment credential. Allowable Values: 3 chars Valid three-digit ISO 4217 currency code (Alpha-3) |
| preferredFor array of strings Optional | Indicates if a payment credential is a preferred Receiving, Sending, or Paying account. Allowable Values: RECEIVE, SEND, PAYING |
Sample request body
JSON
{
"cardToken": "4111111145551142",
"billingAddress": {
"country": "USA",
"streetName": "12",
"city": "San Francisco",
"postalCode": "94105",
"addressLine1": "1000 Market Street",
"buildingNumber": "56",
"addressLine2": "Suite 101",
"state": "CA",
"minorSubdivisionCode": "CA"
},
"nameOnCard": "John Doe",
"cardType": "Visa Platinum",
"issuerName": "Bank A",
"currencyCode": "USD",
"preferredFor": [
"RECEIVE",
"SEND"
]
}
Response body
| Fields | Description |
|---|---|
| id string Returned | UUID generated by Alias Directory, a utility used to identify the payment credential. Allowable Values: 36 char max |
| type string Returned | Indicates the type of payment credential. Allowable Values: CARD, BANK |
| externalId string Conditionally returned | External ID of the payment credential, which corresponds to Marqeta’s card token. Allowable Values: 1–100 chars |
Sample response body
JSON
{
"id": "a44c9553-e687-4f3c-b7e7-a4245d9f238e",
"type": "CARD",
"externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85"
}