Vault (alias gateway)

1
Last updated 2 months ago

The Alias Gateway allows you to pass credit card data directly to the PCI Proxy vault to create tokens. This can be interesting if you want to migrate existing credit card data that is currently stored somewhere else to store it within the PCI Proxy vault.

We strongly discourage passing credit card data directly to our Alias Gateway as it means your systems get in contact with full credit card numbers. Please use the Filter Proxy or Secure Fields to reduce your PCI scope to a minimum.

post
XML Alias Gateway

https://api.sandbox.datatrans.com/
upp/jsp/XML_AliasGateway.jsp
The XML Alias Gateway converts credit card data into tokens. The service allows bulk tokenization, allowing multiple <alias> elements, so it is possible to tokenize a card and a cvv at the same time.
Request
Response
Headers
Authorization
required
string
Basic MTEwMDAwNzAwNjpLNnFYMXUkIQ==
Content-Type
optional
string
API consumes text/xml
Body Parameters
merchantId
optional
string
Your unique account id at PCI Proxy (e.g. 1000011011)
cardno
optional
string
Credit card number (PAN) to be tokenized
cvv
optional
string
Security code (CVV/CVC) to be tokenized
200: OK
You receive a credit card token (aliasCC) and CVV token (aliasCVV).
<?xml version='1.0' encoding='UTF-8'?>
<aliasCCService version="1">
<body merchantId="1000011011" status="accepted">
<alias aliasStatus="response">
<request>
<cardno>375811111111115</cardno>
</request>
<response>
<aliasCC>375811OMTYEE115</aliasCC>
<cardno>375811111111115</cardno>
<maskedCC>375811xxxxx1115</maskedCC>
</response>
</alias>
<alias aliasStatus="response">
<request>
<cvv>123</cvv>
</request>
<response>
<aliasCVV>EicQYIP6QA69Or_6DqBOLNQf</aliasCVV>
<uppCvvExpiryDate>2017-03-28</uppCvvExpiryDate>
</response>
</alias>
</body>
</aliasCCService>
400: Bad Request
Invalid value passed for one of the attributes (e.g. merchantId).
<?xml version='1.0' encoding='UTF-8'?>
<aliasCCService version="1">
<body merchantId="1000011011" status="accepted">
<alias aliasStatus="error">
<request>
<cardno>000</cardno>
</request>
<error>
<errorCode>1004</errorCode>
<errorMessage>CC number is not valid</errorMessage>
<errorDetail>check modulo-10 failed</errorDetail>
</error>
</alias>
<alias aliasStatus="error">
<request>
<cvv>a</cvv>
</request>
<error>
<errorCode>2022</errorCode>
<errorMessage>invalid value</errorMessage>
<errorDetail>cvv</errorDetail>
</error>
</alias>
</body>
</aliasCCService>

The service requires basic authentication. The password can be found in the Web Admin Tool under UPP Administration > Security > Server-to-Server services security.

Examples

Example Request
Example Response
Bad Request Error Case
Error Case Response
curl "https://api.sandbox.datatrans.com/upp/jsp/XML_AliasGateway.jsp" \
-H "Content-Type: text/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?>
<aliasCCService version="1">
<body merchantId="1000011011">
<alias>
<request>
<cardno>375811111111115</cardno>
</request>
</alias>
<alias>
<request>
<cvv>123</cvv>
</request>
</alias>
</body>
</aliasCCService>'

In test mode, only test credit cards are allowed.

Error cases

errorCode

errorMessage

Explanation

1004

CC number not valid

Luhn check failed

2000

access denied

XML alias service not enabled by Datatrans

2001

no input document

Request body does not contain XML payload

2002

error building document

Wrong XML payload in request

2011

root element invalid

Root element is not <aliasCCService>

2012

body element missing

<body> element in request is missing

2013

merchantId missing

<body> element does not have a merchantId attribute

2014

element missing

Element is missing. For example <alias>

2022

invalid value

Invalid value passed for an attribute. (e.g. merchantId)

-889

CC-alias error

Input paramter(s) missing. For example <cardno>

Next up