Vault (alias gateway)
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.
post
https://api.sandbox.datatrans.com/
upp/jsp/XML_AliasGateway.jsp
XML Alias Gateway
The service requires HTTP basic authentication. The required credentials can be found in our dashboard. Please refer to API authentication data for more information.

Examples

Example Request
Example Response
Bad Request Error Case
Error Case Response
1
curl -L -X POST 'https://api.sandbox.datatrans.com/upp/jsp/XML_AliasGateway.jsp' \
2
-H 'Content-Type: text/xml' \
3
-H 'Authorization: Basic MTEwMDAxNzc4OTpNQUd6UUVEbkVxd001d0Vr' \
4
--data-raw ' <aliasCCService version="3">
5
<body merchantId="1100017789">
6
<alias>
7
<request>
8
<cardno>4242424242424242</cardno>
9
</request>
10
</alias>
11
<alias>
12
<request>
13
<cvv>123</cvv>
14
</request>
15
</alias>
16
</body>
17
</aliasCCService>'
Copied!
1
<aliasCCService version='3'>
2
<body merchantId='1100017789' status='accepted'>
3
<alias aliasStatus='response'>
4
<request>
5
<cardno>4242424242424242</cardno>
6
</request>
7
<response>
8
<aliasCC>AAABeM8o_izssdexyrAAAS7Q-uDnAMF_</aliasCC>
9
<cardno>4242424242424242</cardno>
10
<maskedCC>424242xxxxxx4242</maskedCC>
11
<fingerprint>F-dV5V8dE0SZLoTurWbq2HZp</fingerprint>
12
</response>
13
</alias>
14
<alias aliasStatus='response'>
15
<request>
16
<cvv>123</cvv>
17
</request>
18
<response>
19
<aliasCVV>ybImDdgvT3KGAD0EGZhmRvYq</aliasCVV>
20
<uppCvvExpiryDate>2022-12-05</uppCvvExpiryDate>
21
</response>
22
</alias>
23
</body>
24
</aliasCCService>
Copied!
1
curl "https://api.sandbox.datatrans.com/upp/jsp/XML_AliasGateway.jsp" \
2
-H "Content-Type: text/xml" \
3
-d '<?xml version="1.0" encoding="UTF-8"?>
4
<aliasCCService version="1">
5
<body merchantId="1000011011">
6
<alias>
7
<request>
8
<cardno>000</cardno>
9
</request>
10
</alias>
11
<alias>
12
<request>
13
<cvv>a</cvv>
14
</request>
15
</alias>
16
</body>
17
</aliasCCService>'
Copied!
1
<?xml version='1.0' encoding='UTF-8'?>
2
<aliasCCService version="1">
3
<body merchantId="1000011011" status="accepted">
4
<alias aliasStatus="error">
5
<request>
6
<cardno>000</cardno>
7
</request>
8
<error>
9
<errorCode>1004</errorCode>
10
<errorMessage>CC number is not valid</errorMessage>
11
<errorDetail>check modulo-10 failed</errorDetail>
12
</error>
13
</alias>
14
<alias aliasStatus="error">
15
<request>
16
<cvv>a</cvv>
17
</request>
18
<error>
19
<errorCode>2022</errorCode>
20
<errorMessage>invalid value</errorMessage>
21
<errorDetail>cvv</errorDetail>
22
</error>
23
</alias>
24
</body>
25
</aliasCCService>
Copied!
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

Last modified 4d ago