Links

Patch

Update an existing alias
Use the Alias Patch endpoint to update an existing alias. It allows you to either update and map the expiry date (expiry year and month) of a card to it or remove the underlying PAN of an alias form your vault.
Adding the expiry date is useful when the expiry date is not already submitted in the initial alias creation request. Such as for instance when using the Filter or SFTP proxy. An alias with a mapped expiry date is required when you plan to create a Network Token after the initial PCI Proxy tokenisation.
Removing a PAN from storage is helpful if you need to comply with certain regulations which doesn't allow anyone in the payment eco system to store plain text card numbers anymore.
Please consider, that removing a PAN only works when your account is enabled for Network Tokenisation and we have been able to provision a Network Token for a given card number. A removed PAN can not be restored.
The Alias Patch API is only working with the two latest Alias 2.0 format.

Endpoints

Alias Patch request

patch
https://api.sandbox.datatrans.com
/v1/aliases/{alias}
PATCH alias

Examples

Request (expiry date)
Response
Request (remove PAN)
Response
curl -L -X PATCH 'https://api.sandbox.datatrans.com/v1/aliases/7LHXscqwAAEAAAGFDIr3SD05RBVAAK5n' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Authorization: {merchantId}:{password}' \
--data-raw '{
"expiryMonth": "02",
"expiryYear": "23"
}'
{
"alias": "7LHXscqwAAEAAAGFDIr3SD05RBVAAK5n",
"fingerprint": "F-dYOqJEhLBUD5Qs6i-_uJOr",
"type": "CARD",
"masked": "420034xxxxxx0015",
"dateCreated": "2022-12-13T17:31:52Z",
"card": {
"expiryMonth": "02",
"expiryYear": "23",
"cardInfo": {
"brand": "VISA",
"type": "credit",
"usage": "consumer",
"country": "DE",
"issuer": "VISA U.S.A. INC."
},
"tokenInfo": {
"expiryMonth": "12",
"expiryYear": "22"
}
}
}
curl -L -X PATCH 'https://api.sandbox.datatrans.com/v1/aliases/7LHXscqwAAEAAAGFDDm7on4gPrwPAMrW' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Authorization: {merchantId}:{password}' \
--data-raw '{
"removePlain": true
}'
{
"alias": "7LHXscqwAAEAAAGFgnDhB3yHmsrQACZy",
"fingerprint": "F-dYOqJEhLBUD5Qs6i-_uJOr",
"type": "CARD",
"masked": "420034xxxxxx0015",
"dateCreated": "2022-12-13T17:31:52Z",
"card": {
"panRemoved": true,
"expiryMonth": "02",
"expiryYear": "23",
"cardInfo": {
"brand": "VISA",
"type": "credit",
"usage": "consumer",
"country": "DE",
"issuer": "VISA U.S.A. INC."
},
"tokenInfo": {
"expiryMonth": "12",
"expiryYear": "22"
}
}
}

PATCH expiry date

The response object tokenInfo indicates if a Network Token has been created. A missing tokenInfo object means the Network Token creation failed.

PATCH removePlain

The response parameter panRemoved indicates if the PAN has been removed from storage for a given alias. You can also call the Alias status API if you are not sure whether the PAN is still existing or not.
Last modified 3mo ago